When the data entry is done, the program will display a list of options as follow....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
When the data entry is done, the program will display a list of options as follow. 1 Search test result by applicant Id 2 Search test result(s) by applicant name 3 Search test result(s) by overall score 4 Show test result(s) with highest overall score 5 Show failure list 6 Quit Please choose an option: Option 1 The program will prompt the user to enter an applicant Id, search and display the corresponding test result. The program will display an appropriate message if the there is no matching test result. Option 2 The program will prompt the user to enter an applicant name, search and display the corresponding test result(s). The program will display an appropriate message if the there is no matching test result. Option 3 The program will prompt the user to enter two scores: lower bound and upper bound. The program will display test results whose overall score is between the range (inclusive of both ends). The program will display an appropriate message if the there is no matching test result. Option 4 The program will display test results whose overall score is the same as the highest overall score of the results in the ArrayList. The program will display an appropriate message if the there is no matching test result. Option 5 The program will display test results whose overall score is below the passing marking. The program will display an appropriate message if the there is no matching test result. Option 6 The program will exit the loop and terminate. Class Design The program will consist of two or more classes depending on your design. One class will contain the main method, and is responsible for interacting with the user (input/output) among other things. Write a Java program to allow user to input, save and manipulate a list of test results. A test result includes the applicant Id, name and the two test scores of an applicant taking a test. The program will allow the user to input test result repeatedly until the user indicates to stop. The following screenshot of the program execution illustrates the program flow. You may use an instance of ArrayList to save the results. https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html Candidate Id: C001 Name : Alice Test 1 score: 60 Test 2 score: 85 Enter another record? (y/n) y Candidate Id: C004 Name : Eric Chan Test 1 score: 58 Test 2 score: 74 Enter another record? (y/n) n The TestResult class will include instance variables to store the applicant Id, name and the two test scores. The Test Result class must include appropriate constructor(s), getters, setters and the following methods: • A method to compute the overall score using the formula: o overall score = test score 1 x 40% + test score 2 x 60% A method to compute and return the grade based on the overall score: o Overall score >= 75 → "Good" 。 Overall score is between 50 and 74 (inclusive at both ends) → "Pass" o Overall score < 50 "Fail" A method to compare two instances of TestResult: o The method will include a parameter of TestResult. o The method will compare the applicant Ids and return true if are the same Id. o https://www.softwaretestinghelp.com/equals-method-in-java/ o https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html You may include additional instance and/or static methods as you deemed fit. When the data entry is done, the program will display a list of options as follow. 1 Search test result by applicant Id 2 Search test result(s) by applicant name 3 Search test result(s) by overall score 4 Show test result(s) with highest overall score 5 Show failure list 6 Quit Please choose an option: Option 1 The program will prompt the user to enter an applicant Id, search and display the corresponding test result. The program will display an appropriate message if the there is no matching test result. Option 2 The program will prompt the user to enter an applicant name, search and display the corresponding test result(s). The program will display an appropriate message if the there is no matching test result. Option 3 The program will prompt the user to enter two scores: lower bound and upper bound. The program will display test results whose overall score is between the range (inclusive of both ends). The program will display an appropriate message if the there is no matching test result. Option 4 The program will display test results whose overall score is the same as the highest overall score of the results in the ArrayList. The program will display an appropriate message if the there is no matching test result. Option 5 The program will display test results whose overall score is below the passing marking. The program will display an appropriate message if the there is no matching test result. Option 6 The program will exit the loop and terminate. Class Design The program will consist of two or more classes depending on your design. One class will contain the main method, and is responsible for interacting with the user (input/output) among other things. When the data entry is done, the program will display a list of options as follow. 1 Search test result by applicant Id 2 Search test result(s) by applicant name 3 Search test result(s) by overall score 4 Show test result(s) with highest overall score 5 Show failure list 6 Quit Please choose an option: Option 1 The program will prompt the user to enter an applicant Id, search and display the corresponding test result. The program will display an appropriate message if the there is no matching test result. Option 2 The program will prompt the user to enter an applicant name, search and display the corresponding test result(s). The program will display an appropriate message if the there is no matching test result. Option 3 The program will prompt the user to enter two scores: lower bound and upper bound. The program will display test results whose overall score is between the range (inclusive of both ends). The program will display an appropriate message if the there is no matching test result. Option 4 The program will display test results whose overall score is the same as the highest overall score of the results in the ArrayList. The program will display an appropriate message if the there is no matching test result. Option 5 The program will display test results whose overall score is below the passing marking. The program will display an appropriate message if the there is no matching test result. Option 6 The program will exit the loop and terminate. Class Design The program will consist of two or more classes depending on your design. One class will contain the main method, and is responsible for interacting with the user (input/output) among other things. When the data entry is done, the program will display a list of options as follow. 1 Search test result by applicant Id 2 Search test result(s) by applicant name 3 Search test result(s) by overall score 4 Show test result(s) with highest overall score 5 Show failure list 6 Quit Please choose an option: Option 1 The program will prompt the user to enter an applicant Id, search and display the corresponding test result. The program will display an appropriate message if the there is no matching test result. Option 2 The program will prompt the user to enter an applicant name, search and display the corresponding test result(s). The program will display an appropriate message if the there is no matching test result. Option 3 The program will prompt the user to enter two scores: lower bound and upper bound. The program will display test results whose overall score is between the range (inclusive of both ends). The program will display an appropriate message if the there is no matching test result. Option 4 The program will display test results whose overall score is the same as the highest overall score of the results in the ArrayList. The program will display an appropriate message if the there is no matching test result. Option 5 The program will display test results whose overall score is below the passing marking. The program will display an appropriate message if the there is no matching test result. Option 6 The program will exit the loop and terminate. Class Design The program will consist of two or more classes depending on your design. One class will contain the main method, and is responsible for interacting with the user (input/output) among other things. Write a Java program to allow user to input, save and manipulate a list of test results. A test result includes the applicant Id, name and the two test scores of an applicant taking a test. The program will allow the user to input test result repeatedly until the user indicates to stop. The following screenshot of the program execution illustrates the program flow. You may use an instance of ArrayList to save the results. https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html Candidate Id: C001 Name : Alice Test 1 score: 60 Test 2 score: 85 Enter another record? (y/n) y Candidate Id: C004 Name : Eric Chan Test 1 score: 58 Test 2 score: 74 Enter another record? (y/n) n Write a Java program to allow user to input, save and manipulate a list of test results. A test result includes the applicant Id, name and the two test scores of an applicant taking a test. The program will allow the user to input test result repeatedly until the user indicates to stop. The following screenshot of the program execution illustrates the program flow. You may use an instance of ArrayList to save the results. https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html Candidate Id: C001 Name : Alice Test 1 score: 60 Test 2 score: 85 Enter another record? (y/n) y Candidate Id: C004 Name : Eric Chan Test 1 score: 58 Test 2 score: 74 Enter another record? (y/n) n Write a Java program to allow user to input, save and manipulate a list of test results. A test result includes the applicant Id, name and the two test scores of an applicant taking a test. The program will allow the user to input test result repeatedly until the user indicates to stop. The following screenshot of the program execution illustrates the program flow. You may use an instance of ArrayList to save the results. https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html Candidate Id: C001 Name : Alice Test 1 score: 60 Test 2 score: 85 Enter another record? (y/n) y Candidate Id: C004 Name : Eric Chan Test 1 score: 58 Test 2 score: 74 Enter another record? (y/n) n The TestResult class will include instance variables to store the applicant Id, name and the two test scores. The Test Result class must include appropriate constructor(s), getters, setters and the following methods: • A method to compute the overall score using the formula: o overall score = test score 1 x 40% + test score 2 x 60% A method to compute and return the grade based on the overall score: o Overall score >= 75 → "Good" 。 Overall score is between 50 and 74 (inclusive at both ends) → "Pass" o Overall score < 50 "Fail" A method to compare two instances of TestResult: o The method will include a parameter of TestResult. o The method will compare the applicant Ids and return true if are the same Id. o https://www.softwaretestinghelp.com/equals-method-in-java/ o https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html You may include additional instance and/or static methods as you deemed fit. The TestResult class will include instance variables to store the applicant Id, name and the two test scores. The Test Result class must include appropriate constructor(s), getters, setters and the following methods: • A method to compute the overall score using the formula: o overall score = test score 1 x 40% + test score 2 x 60% A method to compute and return the grade based on the overall score: o Overall score >= 75 → "Good" 。 Overall score is between 50 and 74 (inclusive at both ends) → "Pass" o Overall score < 50 "Fail" A method to compare two instances of TestResult: o The method will include a parameter of TestResult. o The method will compare the applicant Ids and return true if are the same Id. o https://www.softwaretestinghelp.com/equals-method-in-java/ o https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html You may include additional instance and/or static methods as you deemed fit. The TestResult class will include instance variables to store the applicant Id, name and the two test scores. The Test Result class must include appropriate constructor(s), getters, setters and the following methods: • A method to compute the overall score using the formula: o overall score = test score 1 x 40% + test score 2 x 60% A method to compute and return the grade based on the overall score: o Overall score >= 75 → "Good" 。 Overall score is between 50 and 74 (inclusive at both ends) → "Pass" o Overall score < 50 "Fail" A method to compare two instances of TestResult: o The method will include a parameter of TestResult. o The method will compare the applicant Ids and return true if are the same Id. o https://www.softwaretestinghelp.com/equals-method-in-java/ o https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html You may include additional instance and/or static methods as you deemed fit.
Expert Answer:
Answer rating: 100% (QA)
Code import javautilScanner import javautilArrayList create a class named TestResult class TestResult private instance variables private String id name private int score1 score2 parameterized construc... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Question 18. A cart of mass m begins at rest, and is connected to a spring of spring constant k which is compressed a distance x away from equilibrium. It is released, rolling to the right with no...
-
AVC Ltd. is a company that manufactures and sells a single product, which they call a Toodle. For planning and control purposes they utilize a monthly master budget, which is usually developed at...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
A ball is dropped from a high rise platform at t = 0 starting from rest. After 6 seconds another ball is thrown downwards from the same platform with a speed v. The two balls meet at t = 18s. What is...
-
Complete the table below on the basis of the conservation of energy principle for a closed system. Btu Btu Btu Bt bm Btu/lbm 150 -200 2 1020 860 350 130 550 260 600 350 130 00 3 50 1000
-
What are the two components of a signal when the signal is represented on a constellation diagram? Which component is shown on the horizontal axis? Which is shown on the vertical axis?
-
What is one whole step down from \(G^{b}\) ? State the requested note.
-
Pancake collapse of a tall building. In the section of a tall building shown in Figure a, the infrastructure of any given floor K must support the weight W of all higher floors. Normally the...
-
Bosco works with Superbeta Industries for the past 2 years. The organisation has been experiencing profit decline for the past six months. Bosco needs the financial statements to determine if his A ....
-
An automatic machine produces (thousands of) units of a product per day. As increases, the proportion of defectives, p, goes up according to the following probability density function Each...
-
Expected Return Microsoft: 10% Volatility Microsoft: 20% Expected Return Walmart: 12% Volatility Walmart: 30% Correlation between Microsoft and Walmart: 1/2 Risk Free Rate: 3% What is the volatility...
-
What are the various ways of sharing profits between partners, and why are they used?
-
What liability should the city report on government-wide f inancial statements at the end of Year 1? a. It depends on whether the employees work at governmental activities or business-type...
-
You are the auditor of a mail order company which sells clothes on an approval basis through a large number of customers spread across the country. Customers are given 30 days to pay for goods after...
-
Identify and quantify the costs that are relevant to a particular decision.
-
A city government has a nine-year capital lease for property being used within the General Fund. The lease was signed on January 1, 2010. Minimum lease payments total \($90,000\) starting at the end...
-
A company makes two products-Product A and B. Data regarding the two products follow Direct Labor-Hours Product A Product Bi per Unit 0.75 0.50 Annual Production 20,000 units 50,000 units Additional...
-
The age-old saying for investing is "buy low and sell high," but this is easier said than done. Investors who panic about falling prices sell their investments, which in turn lowers the price and...
-
On September 14, 2012, Jay purchased a passenger automobile that is used 75 percent in his accounting business. The automobile has a basis for depreciation purposes of $35,000, and Jay uses the...
-
Indicate, in each of the following situations, the number of exemptions the taxpayers are entitled to claim on their 2012 income tax returns. Number of Exemptions a. Donna, a 20-year-old single...
-
During 2012, Tom sold Sears stock for $10,000. The stock was purchased 4 years ago for $13,000. Tom also sold Ford Motor Company bonds for $35,000. The bonds were purchased 2 months ago for $30,000....
-
Why is the productivity of a firms workforce important strategically?
-
How does the general manager pinpoint his or her organizations weaknesses?
-
What factors influence employees willingness to support efforts to increase productivity?
Study smarter with the SolutionInn App