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
-
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...
-
MacKenzie Harper doesn't understand why some events are recorded as accounting transactions but others are not. Explain.
-
Nutterco, Inc., produces two types of nut butter: peanut butter and cashew butter. Of the two, peanut butter is the more popular. Cashew butter is a specialty line using smaller jars and fewer jars...
-
Given a standard Wiener process \(W_{t}\), find: - The joint probability - The variance The set theoretical notation refers to the intersection of events, and is equivalent to the logical and. We...
-
Frederick Manufacturing Corp. ordered 500 dozen units of Import Traders rubber pads for $2,580. The order indicated that the pads should be as soft as possible. Import Traders delivered the rubber...
-
1. The tryptophan (trp) operon is a continuous segment of the E. coli chromosome, containing five genes (blue) that encode the enzymes necessary for the stepwise synthesis of tryptophan. There are...
-
When Cooper and Zubek (1958) replicated the maze-bright/dull experiment, they found that maze-bright rats made significant fewer maze errors than maze-dull rats only if both groups had: O been reared...
-
At a school, 40% of the teachers teach English. If 20 teachers teach English, how many teachers work at the school? P^(10). A patient was given blood pressure medicine at a dosage of 2 grams.
-
Use slope to determine whether the points A(3,5), B(-2,6), and C(-5,7) are on the same line. Justify your conclusion algebraically.
-
MULTIPLE-CHOICE QUESTION Which step in the digital proficiency process focuses on choosing an effective tool for your goal? Use Review Select
-
Explain how exchange rate moves towards equilibrium via external balance in Import/Export , if the country has adopted a floating exchange rate system.
-
Critically analyze the handover process using two based stations.Include in your analysis a mobile node travelling at a velocity of v km / h headingfrom west to east. Determine two points in which a...
-
If v u = v w and v # 0, then u = w. Select one: True X False
-
Explain the regulation of the secretions of the small intestine.
-
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....
-
Read the following extract from an article about a business venture of the Bob Jane company. Is prudence still a virtue? The concept of prudence and its use, or non-use, in financial reporting has...
-
Your friend Ninette Nobis was a tourism management student when you were at university together and is now a manager of an upmarket hotel in the Exquisite Hotels chain. Because of the impact of an...
-
Transactions affecting Bradford Ltds accounts receivable for the year ended 30 June are presented below. On 1 July of the previous year, the opening balance of the Allowance for Doubtful Debts...
Study smarter with the SolutionInn App