Question: Assignment #8 (Recursion, Arrays), CSE 205, 40 Points Due Date: Monday, Nov 6th 2017, at 11.59pm Important: Thisis an indioidual assignment. Please do not collaborate.
Assignment #8 (Recursion, Arrays), CSE 205, 40 Points Due Date: Monday, Nov 6th 2017, at 11.59pm Important: Thisis an indioidual assignment. Please do not collaborate. Program Description: Write a program that reads in a sequence of integers from standard input until 0 is read, and stores them in an array. You may assume that there will not be more than 100 numbers Then compute the minimum number stored in the array, the count of odd numbers (includes both postive and negative odd integers), the number of-1 stored inside the array and compute the sum of numbers at even indexes (Le. 0, 2, 4,..), using recursion. Thus you will create recursive methods findMin, countOdd, countNegativeOne and computeSumAtEvenIndexes in Assignment8 class and they will be called by a main method. Specifically, the following four recursive methods must be implemented (These method should not contain any loop): I(L) It finds the minimum number in the partial array range from startindex to endIndex public static int findMinlfintl I numbers, int startindes, int endlndex) u(2) It counts the mumber of odd integers in the partial arrya range from startlndex to endindex public static int countOdd(int Inumbers, int startindex, int endIndex) 3 )It counts the number of-1 inside an array with "count" mumbers, index ranges from O to count-i public static int countNegativeOnelint! I numbers, int count) /(4) It computes the sum of numbers at Imdex 0, 2.... mside a partilal array with "count" numbers inside, index ranges from 0 to count-l public static int computeSum.AtEvenIndexestintl I numbers, int count) If these methods are implemented using a loop, points will be deducted even if your program passes test cases. DO NOT use any Static Variables either. 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 The total number of odd integers is The total number of-1 is um of mumbes a eve ns
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
