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 20:10
Assume that minutes is an int variable whose value is 0 or positive. write an expression whose value is "undercooked" or "soft-boiled" or "medium-boiled" or "hard-boiled" or "overcooked" based on the value of minutes. in particular: if the value of minutes is less than 2 the expression's value is "undercooked"; 2-4 would be a "soft-boiled", 5-7 would be "medium-boiled", 8-11 would be "hard-boiled" and 12 or more would be a "overcooked".
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
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: 13722360