subject

In this problem, there will be the construction of a program that reads in a sequence of integers from standard input until 0 is read and store them in an array (including 0). This is done using iteration (choose one of for, while, or do-while loop). You may assume that there will not be more than 100 numbers.
Then compute the minimum number, count odd integers, compute the sum of numbers that are larger than the first number in the array, and compute the largest even integer in the sequence using recursion. Thus, you will create recursive methods findMin, countOddNumbers, computeLargestEven, and in Assignment9 class and they will be called by a main method.
Specifically, the following recursive methods must be implemented (These methods should not contain any loop):

public static int findMin(int[] numbers, int startIndex, int endIndex)
public static int countOddNumbers(int[] elements, int startIndex, int endIndex)
public static int computeLargestEven(int[] elements, int startIndex, int endIndex)
public static int (int[] elements, int startIndex, int endIndex, int firstNumber)

If these methods are implemented using a Loop or any Static Variable, points will be deducted even if your program passes test cases. DO NOT use any Static Variables.
The program should output the results of those calculations to standard output. Your program will continue to read in numbers until the number 0 is entered. At this point, the calculations will be outputted in the following format:

The minimum number is 0
The count of odd integers in the sequence is 0
The largest even integer in the sequence is 0
The sum of numbers larger than the first is 0
Note that the result values will be different depending on test cases (not always 0).

Do not output a prompt to query for the numbers. The number 0 is included in the sequence of numbers and should be included in all of your calculations.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Ihave a music player on my phone. i can buy songs, add them to playlists and play them. obviously it would be redundant to store each song in each playlist; each playlist is just a list of pointers to the songs. for this lab you will simulate this behavior. your program will need to have options to: add songs to the system library (you will store the text of the first line of the song, rather than the audio) add playlists add songs to a playlist list playlists play a playlist list all of the songs in the library with a count of how many times each song has been played remove a song from a playlist remove a playlist remove a song from the library (and thus from all playlists that contain it) note that we will not be checking many error cases. in real programming this would be bad, you should usually try to recognize and respond to as many types of errors as you can. in the context of class we are trying to acquaint you with as many concepts as possible, so for the sake of educational efficiency we will not be checking most errors in this lab, you may assume that your user provides correct input. you may add all appropriate error testing if you wish, but we will not be testing for it.
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
You know the right answer?
In this problem, there will be the construction of a program that reads in a sequence of integers fr...
Questions
Questions on the website: 13722362