1. Write the code of public static double [] generateRandomGrades (Random random) that generates an array...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write the code of public static double [] generateRandomGrades (Random random) that generates an array of 5 random grade between 40 and 100 inclusive (5 marks) 2. Add a code in the main () method that instantiates 5 grade objects and initializes each grade to random grades, and store them in ArrayList grades (see figure 2 on page 5) (20 marks) Windows PowerShell PS F:\Teaching\Langara\spring-2023\CPSC-1181-Object-Oriented-Computing\myExamples\eclipse\grade> javac -d bin src/grade/*.java PS F:\Teaching\Langara\spring-2023\CPSC-1181-Object-Oriented-Computing\myExamples\eclipse\grade> java -cp bin util.TestingGrade [ | Quizzes Grade: 79.06 | Labs Grade: 78.62 | Assignments Grade: 94.78 | Midterm Exam Grade: 47.59 | Final Exam Grade: 51.74 Course Grade: 63.74 Grade Letter: C Quizzes Grade: 53.91 | Labs Grade: 99.98 | Assignments Grade: 89.27 Midterm Exam Grade: 76.86 Final Exam Grade: 53.21 Course Grade: 70.49 Grade Letter: B- Quizzes Grade: 65.06 Labs Grade: 61.44 | Assignments Grade: 89.46 Midterm Exam Grade: 73.69 | Final Exam Grade: 92.00 Course Grade: 79.03 | Grade Letter: B+ Quizzes Grade: 85.98 | Labs Grade: 44.71 Assignments Grade: 60.66 Midterm Exam Grade: 58.25 | Final Exam Grade: 60.25 Course Grade: 62.02 | Grade Letter: C- Quizzes Grade: 91.83 Labs Grade: 67.40 Assignments Grade: 90.41 Midterm Exam Grade: 51.28 Final Exam Grade: 60.95 Course Grade: 67.75 Grade Letter: C+ | OX ] PS F:\Teaching\Langara\spring-2023\CPSC-1181-Object-Oriented-Computing\myExamples\eclipse\grade> 1. Write the code of public static double [] generateRandomGrades (Random random) that generates an array of 5 random grade between 40 and 100 inclusive (5 marks) 2. Add a code in the main () method that instantiates 5 grade objects and initializes each grade to random grades, and store them in ArrayList grades (see figure 2 on page 5) (20 marks) Windows PowerShell PS F:\Teaching\Langara\spring-2023\CPSC-1181-Object-Oriented-Computing\myExamples\eclipse\grade> javac -d bin src/grade/*.java PS F:\Teaching\Langara\spring-2023\CPSC-1181-Object-Oriented-Computing\myExamples\eclipse\grade> java -cp bin util.TestingGrade [ | Quizzes Grade: 79.06 | Labs Grade: 78.62 | Assignments Grade: 94.78 | Midterm Exam Grade: 47.59 | Final Exam Grade: 51.74 Course Grade: 63.74 Grade Letter: C Quizzes Grade: 53.91 | Labs Grade: 99.98 | Assignments Grade: 89.27 Midterm Exam Grade: 76.86 Final Exam Grade: 53.21 Course Grade: 70.49 Grade Letter: B- Quizzes Grade: 65.06 Labs Grade: 61.44 | Assignments Grade: 89.46 Midterm Exam Grade: 73.69 | Final Exam Grade: 92.00 Course Grade: 79.03 | Grade Letter: B+ Quizzes Grade: 85.98 | Labs Grade: 44.71 Assignments Grade: 60.66 Midterm Exam Grade: 58.25 | Final Exam Grade: 60.25 Course Grade: 62.02 | Grade Letter: C- Quizzes Grade: 91.83 Labs Grade: 67.40 Assignments Grade: 90.41 Midterm Exam Grade: 51.28 Final Exam Grade: 60.95 Course Grade: 67.75 Grade Letter: C+ | OX ] PS F:\Teaching\Langara\spring-2023\CPSC-1181-Object-Oriented-Computing\myExamples\eclipse\grade>
Expert Answer:
Related Book For
Posted Date:
Students also viewed these algorithms questions
-
My question is how to write the code in WareHouse.java This is WareHouse.java package warehouse; /* * * This class implements a warehouse on a Hash Table like structure, * where each entry of the...
-
A researcher wanted to find out if there was difference between older movie goers and younger movie goers with respect to their estimates of a successful actors income. The researcher first...
-
What would likely happen to long-run average cost at Oman's facility if engineers encountered difficulties in maintaining the facility's substantial daily volume of oil production? Explain.
-
If the company expands operations to Italy, will its experience in Spain be valuable, or will the culture be so different that the manufacturer will have to begin a new in determining how to address...
-
Two parallel-plate capacitors, 6.0F each, are connected in parallel to a 10 V battery. One of the capacitors is then squeezed so that its plate separation is 50.0% of its initial value. Because of...
-
Use your answers from S3-7 to determine the total overallocation or underallocation of manufacturing overhead during the year. Actual manufacturing costs for the year for Edmonton Pools totaled...
-
1. What characteristics did Salvatore Parasuco possess that made him successful as an entrepreneur? 2. The visibility of Parasuco jeans is higher in other countries than in Canada. Why might this be...
-
Identify the two modes of tax classifications and their respective tax systems in most open economies? Discuss the economic implications of the above (5a) tax systems in developing economies
-
A cash flow sequence starts in year 1 at $14000 and decreases by $150 each year through year 12. (a) Determine the value of the gradient G; (b) determine the amount of cash flow at the end of year 8;...
-
Ann wants to start a business that processes blueberries so that they are easier for people to store for the winter. How would transportation costs between Bethel and outside of Alaska help or hurt...
-
On the first day of their vacation the Morales family drove 312 miles in 6 hours at that rate how far will they travel the next day if they drive for 8 hours
-
Income elasticity Ei for food is about 0.30. Last year Ali spent $12,000 on food. If he gets a 4% raise in annual pay how much will he spent on food next year?
-
A few years ago, France banned overtime (and the overtime pay that went with it) and reduced weekly working hours from 40 to 35 hours. What types of workers would benefit most from these changes?...
-
(a) 1. Assume a Heckscher-Ohlin world. The two countries are China and the U.S. The two goods are wheat and cloth and the two factors are labor and capital. Suppose each ton of wheat requires 4 units...
-
Company A received an irrevocable L/C issued by bank ABC advised and confirmed by bank DEF. This company shipped the goods according to the requirements of the L/C and was going to present the...
-
Interest Compounded Annually. When P dollars is invested at interest rate i, compounded annually, for t years, the investment grows to A dollars, where A = P(1 + i) t . Trevor's parents deposit $7800...
-
Create a column vector with 9 equally spaced elements in which the first element is -34 and the last element is -7. (A column vector can be created by the transpose of a row vector.)
-
Define the variables x and y as x = 5.1 and y = 4.2, then evaluate: (a) 3/4 xy 7x/y2 + xy (b) (xy)2- x + y/(x-y)l2 + x + y/2x - y
-
A truss is a structure made of members joined at their ends. For the truss shown in the figure, the forces in the 13 members are determined by solving the following system of 13 equations. F2 +...
-
a. For the allowed energies of a particle in a box to be large, should the box be very big or very small? Explain. b. Which is likely to have larger values for the allowed energies: an atom in a...
-
The molecules in the rods and cones in the eye are tuned to absorb photons of particular energies. The retinal molecule, like many molecules, is a long chain. Electrons can freely move along one...
-
What is the daughter nucleus of the decay? The Curiosity rover sent to explore the surface of Mars has an electric generator powered by heat from the radioactive decay of \({ }^{238} \mathrm{Pu}\), a...
Study smarter with the SolutionInn App