Calls the function readarray to read data into the array

Assignment Help JAVA Programming
Reference no: EM13701583

Write functions as given:

Question: 1 Write a function void readArray(int arr[], int length) to read in length many values into the array arr.

Question: 2 Write a function int getMaxPos(int arr[], int length) that calculates and returns the index of the maximum value in the first length positions of the array arr.

Write a main function that:

1. Has an array called data

2. Prompts the user for a size (guaranteed no more than 50)

3. Calls the function readArray to read data into the array

4. Calls the function getMaxPos to find the maximum in the array

Solve these questions in details and provide examples to support your rationale.

 

Reference no: EM13701583

Questions Cloud

Find the balance of the savings account : develop java application to find the balance of the savings account after the end of year - Write an application with three labeled text fields, one each for the initial amount of a savings account, the annual interest rate, and the number of years..
James builds brick walls for custom homes : James builds brick walls for custom homes. he annual sells are $300,000, and his net income is $18,000. he has assets of $100,000 invested in his business. the net profit margin for james is?
Evaluate the time complexity of algorithm : You will be designing a non-member function that accepts as its argument one dynamic bag object (header file found in figure 4.9).  This function will return a reference to a new dynamic bag object.
The principles of behavioral management : Discuss some of the ways in which the principles of behavioral management and operations management can throw light on the Steinway process. How
Calls the function readarray to read data into the array : Write a function void readArray(int arr[], int length) to read in length many values into the array arr.
Calculate monthly mortgage payments : Write a program that will calculate monthly mortgage payments on a house purchase.  The equation you'll want to use is
Implement uniform random number generator : Implement Uniform Random Number generator and Generate 1000 Random number between 0 an 10000.
Variable pay depends on performance : Variable pay depends on performance and is not added to: a) overtime pay b) employee's base pay c) commission pay d) incentive pay e) piece rate earnings 2. Which is NOT true about job evaluation? a) it specifies the content of individual jo..
Write a program that uses a nested loop : Write a program that uses a nested loop togenerate the output shown below. Be sure that the value on the line changes with each digit displayed. For example, line 5 has the values "1", "2", "3", "4", and "5".

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create java program to simulate the operation of a bank atm

write a Java program to simulate the operation of a bank ATM (cashpoint) system for payment and deposit on an account. In order to make the system fairly simple there is only one bank account and there are 5 cards that can be used to deposit or wi..

  Java method that contains code to be executed

Write a short Java method that contains code for which it is probably impossible for that code to ever be executed, but your favorite Java compiler does not detect this fact.

  Show all the objects that are common to both lists

Prepare the segment of code assuming that the objects are of type String and

  Your task in this assignment is to develop a graphical user

your task in this assignment is to develop a graphical user interface based java program that can communicate with a

  Create a java program

UserApp and PrettyPrintUtility multiple times (supplying different TransData test file names), the AutoTesterUtility PROGRAM will be the driver program.

  Explain the inventory program to include an add button

Modify the Inventory Program to include an add button, a delete button, and a modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock

  Create a circle class

create acircle class, which has one field, the radius. the class should contains two constructors: a no-argument constructor that set the radius to zero, and a constructor that takes a parameter to set the radius.

  Write method called median that accepts an array of integer

Write a method called median that accepts an array of integers as its parameter and returns the median of the numbers in the array.

  Develop a java based gui application using swing that

develop a java based gui applicationusing swing that allows the user to enter charityfund informationwrite the

  What secret does soraya tell amir

What secret does soraya tell amir and how does amir react to this information

  Java program use breadth-first search closest broadcast

Write the java program which will use breadth-first search (which you implement as part of your program) to determine the closest broadcast vertex for each vertex in graph.

  Create a java class called samearraysexception

Create a Java class called SameArraysException that extends the Exception class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd