Write a java program (name it countAverage Grades) as follows: The main method prompts the user...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a java program (name it countAverage Grades) 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. Use exception handling to verify that entered grades are between 0 and 100. 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): Class size: Entered grades: Class average: Class size: Entered grades: Class average: 3 100 100 100 100.00 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. Write a java program (name it countAverage Grades) 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. Use exception handling to verify that entered grades are between 0 and 100. 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): Class size: Entered grades: Class average: Class size: Entered grades: Class average: 3 100 100 100 100.00 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.
Expert Answer:
Answer rating: 100% (QA)
Heres a Java program named CountAverageGrades that implements the described functionality java impor... View the full answer
Related Book For
Statistics For Business And Economics
ISBN: 9780132745659
8th Edition
Authors: Paul Newbold, William Carlson, Betty Thorne
Posted Date:
Students also viewed these programming questions
-
In Exercises use the Ratio Test to determine the convergence or divergence of the series. 00 n=1 n! n3n
-
Following two years of no dividend payments to either cumulative preferred or common shareholders management decides to declare a dividend for all shareholders. (a) Is the company required to pay all...
-
On rare occasions, a chromosome can suffer a small deletion that removes the centromere. When this occurs, the chromosome usually is not found within subsequent daughter cells. Explain why a...
-
Increasingly, we are seeing email used in cases involving defendants located in foreign countries. Plaintiffs filed suit against four Defendants: Qingdao Sunflare New Energy Co., Skone Lighting Co.,...
-
a. Calculate the required rate of return for an asset that has a beta of 1.8, given a risk-free rate of 5% and a market return of 10%. b. If investors have become more risk-averse due to recent...
-
Short-Term (Operating) financial planning begins with the forecast. Based on this forecast, operating expenses can be estimated and then pro forma income statement and cash budget can be prepared....
-
Dunlop Livery Antiques: Modernizing the Vintage Industry Bob Colquhoun, owner of Dunlop Livery Antiques (DLA) in Dunlop, Ontario is developing a comprehensive marketing strategy with a focus on...
-
Robert Crandell, former CEO of American Airlines, phoned the former Braniff Airways CEO and said, Raise your fares 20 percent and Ill raise mine the next morning. a. Why would he do this? b. If you...
-
Kelloggs, which controls 32 percent of the breakfast cereal market, cut the prices of some of its best-selling brands of cereal to regain market share lost to Post, which controls 20 percent of the...
-
A recent study of mergers and acquisitions found that 83 percent of the deals achieved did not result in positive shareholder returns. Some resulted in losses. a. If such mergers are not especially...
-
American Airlines offered a 50-percent-off sale and cut fares. Continental Airlines and Northwest Airlines sued American Airlines over this action. a. What was the likely basis of the suit? b. How...
-
While some assets, such as forests, can provide benefits to society in perpetuity, some firms see forests as consumable assets. One example occurred when corporate raider James Goldsmith forcibly...
-
Raytheon wishes to use an automated environmental chamber in the manufacture of electronic components. The chamber is to be used for rigorous reliability testing and burn-in. It is installed for...
-
Briefly discuss the implications of the financial statement presentation project for the reporting of stockholders equity.
-
A publisher is interested in the effects on sales of college texts that include more than 100 data files. The publisher plans to produce 20 texts in the business area and randomly chooses 10 to have...
-
Given a population with a mean of = 200 and a variance of 2 = 625, the central limit theorem applies when the sample size n 25. A random sample of size n = 25 is obtained. a. What are the mean and...
-
An economist estimates the following regression model: y = 0 + 1x1 + 2x2 + The estimates of the parameters 1 and 2 are not very large compared with their respective standard errors. But the size of...
-
A child receives \($100\),000 as a gift, which is deposited in a bank account earning 6 percent compounded semiannually. If \($5\),000 is withdrawn at the end of each half year, how long will the...
-
The plan was to leave $5,000 on deposit in a savings account for 15 years at 6.5 percent interest compounded annually. It became necessary to withdraw $1,500 at the end of the fifth year. How much...
-
A deposit of $3,000 is made in a savings account that pays 7.5 percent interest compounded annually. How much money will be available to the depositor at the end of 16 years? a. $8,877 b. $10,258 c....
Study smarter with the SolutionInn App