QM1. GradesMap.java Please answer accurately and fast, thank you! 1-* * Tests the GradesMap class */ 4
Fantastic news! We've Found the answer you've been seeking!
Question:
QM1.
GradesMap.java
Please answer accurately and fast, thank you!
Transcribed Image Text:
1-* * Tests the GradesMap class */ 4 public class QM1 5 { 2 3 public static void main(String[] args) { GradesMap map = new GradesMap(); 6e 7 8 String[] letterGrades = {"A", "B", "A", "D", "F", "A", "B", "C", "C", "A", "B", "D", "C", "B"}; String[] names = {"Cate", "Russell", "Hugh", "Heath", "Nicole", "Toni", "Guy", "Rose", "Naomi", "Chris", "Liam","Margot", "Sam"}; 10 11 12 for (int i = 0; i < names.length; i++) { map. add(letterGrades[i], names [i]); } map.printGradeDistribution(); System.out.println("Expected:\nA: 4 Cate, Hugh, Toni, Chris\nB: 3 - Russell, Guy, Liam\nC: 3 - Rose, Naomi, Sam\n" 13 14 15 16 17 18 19 + "D: 2 - Heath, Margot\nF: 1 - Nicole"); } 21 } 20 22 1-* * Tests the GradesMap class */ 4 public class QM1 5 { 2 3 public static void main(String[] args) { GradesMap map = new GradesMap(); 6e 7 8 String[] letterGrades = {"A", "B", "A", "D", "F", "A", "B", "C", "C", "A", "B", "D", "C", "B"}; String[] names = {"Cate", "Russell", "Hugh", "Heath", "Nicole", "Toni", "Guy", "Rose", "Naomi", "Chris", "Liam","Margot", "Sam"}; 10 11 12 for (int i = 0; i < names.length; i++) { map. add(letterGrades[i], names [i]); } map.printGradeDistribution(); System.out.println("Expected:\nA: 4 Cate, Hugh, Toni, Chris\nB: 3 - Russell, Guy, Liam\nC: 3 - Rose, Naomi, Sam\n" 13 14 15 16 17 18 19 + "D: 2 - Heath, Margot\nF: 1 - Nicole"); } 21 } 20 22
Expert Answer:
Answer rating: 100% (QA)
GradesMapjava import javautilArrayList import javautilMap import javautilTreeMap public class Grades... View the full answer
Related Book For
Principles of Auditing and Other Assurance Services
ISBN: 978-0078025617
19th edition
Authors: Ray Whittington, Kurt Pany
Posted Date:
Students also viewed these programming questions
-
Write a regular expression for a string literal defined as follows: - Starts and ends with a double quote symbol. - Can contain any number of characters that are not a " or a \. - Can also contain...
-
X CO produces a 16 ounce can of BR at a cost of $1.80 to make and sells for $3.00. 16 ounces of BR can be further refined into 4 small tins of CP. The chrome polish sells for $5.00 per tin. Variable...
-
Sungsam Corporation, a US-based conglomerate, is considering expanding its operations in India. As the group's chief financial officer, you are asked to estimate the firm's weighted average cost of...
-
The graph of f is given. (a) Why is f one-to-one? f is one-to-one because it passes the ---Select--- ? (b) What are the domain and range of f ? ?1 ?(Enter your answers in interval notation.) domain ?...
-
Distinguish between little JIT and big JIT.
-
Multiple-Choice Questions 1. Evans Company completes a service engagement and bills a customer $50,000 on June 19, 2010. Included in the journal entry to record this transaction will be a: a. debit...
-
Assume the same data as given in problem 9, except the company expects the following production: Case A: 300 bbl per month Case B: 500 bbl per month REQUIRED: a. Determine the number of months needed...
-
Suppose that while performing a high-speed wheelie on a motorcycle, Bruno is injured by the intentionally reckless act of an X Entertainment employee. Will a court be likely to enforce the...
-
When switch S is thrown to the left in figure, the plates of capacitor 1 acquire a potential differenceVo. Capacitors 2 and 3 are initially uncharged. The switch is now thrown to the right What are...
-
Jocame Inc. began business on January 2, 20Y7. Salaries were paid to employees on the last day of each month, and social security tax, Medicare tax, and federal income tax were withheld in the...
-
Briefly explain the morphological features protozoa. Give detailed answer.
-
12. Kelly catches the football at the corner of his goal line and the East sideline at the South end of the stadium. He runs the ball to his 40 yard line before being tackled by the opposing team's...
-
a) What is the minimum energy of electrons (in eV) required to observe diffraction from Bragg planes of Ni crystal with a separation of 0.91A? In the Davisson-Germer experiment the angle between the...
-
c) Beam of neutrons available from a nuclear reactor is also often used for diffraction experiments to study crystal structure. What is the range of energy of such neutrons be, say for studying...
-
9. The table shows the behavior of a function f that is continuous on the entire real number line, with f(2)=4 and lim f(x) = 0. f'(x) f"(x) x < 4 f'(x) > 0 f"(x) < 0 x = 4 Undefined Undefined x > 4...
-
T-A race car with a mass of 1500 kg under a constant thrust force of 40 kN starts from rest and reaches a maximum speed of v= 125 m/s in t = 8 s. Accordingly, what will be the average friction...
-
James Howlett (the Wolverine) is saving up for his retirement in sunny Alaska! He has decided to make $500 monthly deposits into his 8.4% compounded monthly investment account for 15 years. At...
-
What are the major functions of audit working papers?
-
The auditors working paper that relates control strengths and weaknesses to the assertions about purchases and accounts payable is presented on page 594. This working paper also presents the auditors...
-
What are the duties and responsibilities of the Public Company Accounting Oversight Board?
-
The textbook states that "data is a resource that must be controlled and managed." Explain this statement, and indicate whether you agree of not, and why.
-
Why do conventional files tend be have duplication of data?
-
One of the dealership's legacy stand-alone systems in the preceding exercise is the salesperson work schedule system. This system was developed in the 1980 s on a single \(P C\), using BASE III, to...
Study smarter with the SolutionInn App