Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming #2 (10 points) Write a java program (name it AverageGradeYourName) as follows: The main method prompts the user to enter number of students in

image text in transcribed

Programming #2 (10 points) Write a java program (name it AverageGradeYourName) as follows: The main method prompts the user to enter number of students in a class (class size is integer value), then prompts the user to enter the grades (between 0 and 100) into an array of type integer. The entered class size determines the array size. Next, the main method passes the filled array to method findAverage (...) to recursively determine and return the class average as a double value. Again, method findAverage (...) is a recursive method. Format the outputs as follows. Shown input values are just for illustration, user may enter values one per line. Test data does not show input prompts. Test data: Class size: Entered grades: Class average: 3 100 100 100 100.00 Class size: Entered grades: Class average: 7 50 75 80 80 40 35 85 63.57 Class size: Entered grades: Class average: 8 0 100 25 90 55 30 90 35 53.13 Document your code, use proper prompts for input, format outputs as shown above, use sound coding practices we learned thus far, do not hard code inputs, allow program re-runs, and test your code thoroughly (Spoiler Alert) On the last page, there is a strategy to get average recursively. Please think yourself first, and check it if you have no idea

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Estate Accounting A Practitioners Guide

Authors: Steven M. Bragg

3rd Edition

164221034X, 978-1642210347

Students also viewed these Databases questions