b. Write the definition of the class Tests such that an object of this class can...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
b. Write the definition of the class Tests such that an object of this class can store a student's first name, last name, five test scores, average tests score, and grade. (Use an array to store the test scores.) Add constructors and methods to manipulate data stored in an object. Among other things, your class must contain methods to calculate test averages, return test averages, calculate grades, return grades, and modify individual test scores. The method tostring must return test data (including student's name, five test scores, average, and grade) as a string. Write a program to calculate students' average test scores and the grade. You may assume the following input data: -Write the class Tests. It will be saved as Tests.java. Make sure to have the following in this class: a. Constructor for first name, last name, five tests scores (an array), average tests score and grade. b. Method to calculate the average c. Method to calculate the letter grade d. Set and Get methods for the names, and tests e. Get Grade method X Cut Java Programming: From Problem Analysis to Program Design f. Get Average method g. toString method -Create another java file to test the class. a. Use the data file I provided. b. Output to the screen not an output file. c. Take a screen shot of your output. 9-2 Jack Johnson 85 83 77 91 76 Lisa Aniston 80 90 95 93 48 Andy Cooper 78 81 11 90 73 Ravi Gupta 92 83 30 69 87 Bonny Blair 23 45 96 38 59 Danny Clark 60 85 45 39.67 Samantha Kennedy 77 31 52 74 83 Robin Bronson 93 94 89 77 97 Sheila Sunny 79 85 28 93 82 Kiran Smith 85 72 49 75 63 Use an array of objects of the class Tests (designed in part (a)) to store each student's data. The program should output data as close as possible to the following form: First Name Last Name Jack Johnson Lisa Aniston Andy Cooper Ravi. Gupta Bonny Blair Danny Clark Samantha Kennedy Bronson Robin Sheila Kiran Sunny Smith Class average- 70.94 Testl Test2 Test3 Test 4 Test5 Average Grade 85.00 83.00 77.00 91.00 76.00 82.40 B 80.00 90.00 95.00 93.00 48.00 81.20 78.00 81.00 11.00 90.00 73.00 66.60 B 92.00 83.00 30.00 23.00 45.00 96.00 69.00 87.00 72.20 38.00 59.00 52.20 67.00 60.00 85.00 45.00 39.00 59.20 77.00 31.00 52.00 74.00 83.00 63.40 93.00 94.00 89.00 77.00 97.00 90.00 85.00 28.00 93.00 82.00 73.40 79.00 85.00 72.00 49.00 75.00 63.00 68.80 DUEADACD С F F b. Write the definition of the class Tests such that an object of this class can store a student's first name, last name, five test scores, average tests score, and grade. (Use an array to store the test scores.) Add constructors and methods to manipulate data stored in an object. Among other things, your class must contain methods to calculate test averages, return test averages, calculate grades, return grades, and modify individual test scores. The method tostring must return test data (including student's name, five test scores, average, and grade) as a string. Write a program to calculate students' average test scores and the grade. You may assume the following input data: -Write the class Tests. It will be saved as Tests.java. Make sure to have the following in this class: a. Constructor for first name, last name, five tests scores (an array), average tests score and grade. b. Method to calculate the average c. Method to calculate the letter grade d. Set and Get methods for the names, and tests e. Get Grade method X Cut Java Programming: From Problem Analysis to Program Design f. Get Average method g. toString method -Create another java file to test the class. a. Use the data file I provided. b. Output to the screen not an output file. c. Take a screen shot of your output. 9-2 Jack Johnson 85 83 77 91 76 Lisa Aniston 80 90 95 93 48 Andy Cooper 78 81 11 90 73 Ravi Gupta 92 83 30 69 87 Bonny Blair 23 45 96 38 59 Danny Clark 60 85 45 39.67 Samantha Kennedy 77 31 52 74 83 Robin Bronson 93 94 89 77 97 Sheila Sunny 79 85 28 93 82 Kiran Smith 85 72 49 75 63 Use an array of objects of the class Tests (designed in part (a)) to store each student's data. The program should output data as close as possible to the following form: First Name Last Name Jack Johnson Lisa Aniston Andy Cooper Ravi. Gupta Bonny Blair Danny Clark Samantha Kennedy Bronson Robin Sheila Kiran Sunny Smith Class average- 70.94 Testl Test2 Test3 Test 4 Test5 Average Grade 85.00 83.00 77.00 91.00 76.00 82.40 B 80.00 90.00 95.00 93.00 48.00 81.20 78.00 81.00 11.00 90.00 73.00 66.60 B 92.00 83.00 30.00 23.00 45.00 96.00 69.00 87.00 72.20 38.00 59.00 52.20 67.00 60.00 85.00 45.00 39.00 59.20 77.00 31.00 52.00 74.00 83.00 63.40 93.00 94.00 89.00 77.00 97.00 90.00 85.00 28.00 93.00 82.00 73.40 79.00 85.00 72.00 49.00 75.00 63.00 68.80 DUEADACD С F F
Expert Answer:
Answer rating: 100% (QA)
Question 1 Here is the definition of the class Tests that meets the requirements mentioned java public class Tests private String firstName private String lastName private double testScores private do... View the full answer
Related Book For
Introduction To Statistics And Data Analysis
ISBN: 9780495118732
3rd Edition
Authors: Roxy Peck, Chris Olsen, Jay L. Devore
Posted Date:
Students also viewed these programming questions
-
Tiger Furnishings produces two models of cabinets for home theater components, the Basic and the Dominator. Data on operations and costs for March follow: Total Units produced Basic 1,100 4,400 1,400...
-
You explain that within these two categories of evaluation there are sub-categories because there are many different aspects of a program that need to be assessed "For example, when we determine...
-
Identify and summarize the most important models and concepts of employee motivation.
-
Develop a program using a programming or macro language to implement the random search method. Design the subprogram so that it is expressly designed to locate a maximum. Test the program with (x, y)...
-
Find FV and PV of the following annuities. What is the relationship between the FVs and PVs? a. 100 per year at 9 per cent for 10 years b. 500 per year for eight years at 15 per cent c. 800 per year...
-
Identify and describe the key attributes that might mitigate a red flag, suggesting that no bad act or compliance issues exist.
-
Capitalization of Interest on July 31, 2010, Bismarck Company engaged Duval Tooling Company to construct a special-purpose piece of factory machinery. Construction was begun immediately and was...
-
37 Solve for N as a function of t, we get N = a(1-1) Some calculation details: +(1-a)) 38 Now let z = 1, a = 0.33, b = 2.15 and t = 0.5, the N you calculated in 37 is
-
Locate the court case Ellis v. Jarvis et al., 117 AFTR 2d 2016-1932. Using only the head notes, answer the following questions: a. What issue(s) did the court address? b. What was the ruling of the...
-
Differentiate financial and economic costs with suitable example. The total revenue (TR) and Average Cost (AC) functions of a firm are given by diom IM pe inq pizad de 15 TR = 4350Q - 13Q Labo AC =...
-
My objective identify the participants and the rules of an auction along with the items being auctioned. I learned that in a sealed-bid first-price auction, the high bidder wins and pays his value....
-
Brady Lumber Company is located in Northern Ontario in the city of Kenora. The company is a producer of oak lumber for furniture companies. Brady has received an offer to supply a special load of...
-
Discuss how some of Dylan's symptoms conform to a diagnosis of ASD. How do some of his behaviors and symptoms deviate from a typical diagnosis of ASD?
-
Compute the variance. The owner of a small manufacturing plant employs six people. As part of their personnel file, she asked each one to record to the nearest one-tenth of a mile the distance they...
-
a) Identify three factors that your firm should have considered before agreeing to conduct the PS1 audit. Do you think your firm should have accepted the audit? Why or why not? (3 marks)
-
Use the given frequency distribution to find the (a) class width. (b) class midpoint of the first class. (c) class boundaries of the first class. (a) 3 OA. (b) 51 (c) 50-52 (a) 2 OC. (b) 51.5 (c)...
-
The population of Detroit, Michigan, decreased from 1,027,974 in 1990 to 688,701 in 2013 (Source: U.S. Census Bureau). Find the average rate of change in the population of Detroit, Michigan, over the...
-
A gas station sells gasoline at the following prices (in cents per gallon, depending on the type of gas and service): 315.9, 318.9, 329.9, 339.9, 344.9, and 359.7. Let y denote the price per gallon...
-
An Associated Press article (San Luis Obispo Telegram-Tribune, September 23, 1995) examined the changing attitudes of Catholic priests. National surveys of priests aged 26 to 35 were conducted in...
-
The article An Analysis of Job Sharing, Full-Time, and Part-Time Arrangements (American Business Review [1989]: 3440) reported on a study of hospital employees from three different groups. Each...
-
Acne Medication and Gastrointestinal Injury Since 1999, Kamie Kendall had experienced ongoing abdominal pain, and she was eventually diagnosed with ulcerative colitis and irritable bowel syndrome...
-
In 1951, DuPont began using the chemical perfluorooctanoic acid to manufacture Teflon. Due to the dangerous nature of the chemical, DuPont was given special instructions by its supplier to dispose of...
-
CMS is a claims processing company in Mobile, Alabama. Chastity Jones, a black woman, completed an online employment application for a customer service position with CMS. Jones interviewed with a...
Study smarter with the SolutionInn App