QuestionQuestion

Transcribed TextTranscribed Text

Program Description In this assignment, you will develop a Console based Grading application. The application does the following: 1. generates random exam score in the range [0, 200] for 11 students and stores it in an array of doubles. See the Implementation Details below for information about how to generate random numbers in Java. 2. generates random homework scores in the range [0,100] for 11 students and stores it in an array of doubles. 3. computes the total score of each student based on the following formula: totalScore = (75 x exam/ 200) + (25 x hw/ 100) 4. determines the grade the student earns given the following grading scheme. The grading scheme is: A: >= 80, B: [60, 80), C: < 60. Note that B:[60, 80) means a student gets a B if his score is >= 60, but strictly less than 80. 5. displays the following on the screen in the format shown in the Sample Output. a. the students’ exam, homework, total scores and grade b. the number of students who got A, B, or C gardes Sample Output Exam HW Total Grade 116 86 65.00 B 142 91 76.00 B 3 91 23.88 C 54 55 34.00 C 92 16 38.50 C 166 23 68.00 B 156 89 80.75 A 173 76 83.88 A 47 21 22.88 C 8 0 3.00 C 181 2 68.38 B Number of students who earned A grade: 2 Number of students who earned B grade: 4 Number of students who earned C grade: 5 Note: This is just one possible output. When you run your program, it may generate a totally different set of random numbers. Implementation Details To implement this application you will use arrays and functions. • The following code will generate 2 random integers in the range 0 to 10 and store in variables n1 and n2 java.util.Random r = new java.util.Random( ); // this line must appear only once // in your code and must be added // before the loop(s) that is used to // generate the random numbers. int n1 = r.nextInt(11); // generates a random number between 0 and 10 // and stores in variable n1 int n2 = r.nextInt(11); // generates another random number between 0 and 10 // and stores in variable n1

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

/**
*
* @author
*/
public class Assignment4 {

    public static void main(String[] args) {
       java.util.Random r = new java.util.Random(); // this line must appear only once
       // in your code and must be added
       // before the loop(s) that is used to
       // generate the random numbers.

       /**
         * generates random exam score in the range [0, 200] for 11 students and
         * stores it in an array of doubles.
         */
       double[] exam = new double[11];
       for (int i = 0; i < exam.length; i++) {
            exam[i] = r.nextDouble() * 200.0;
       }

       /**
         * generates random homework scores in the range [0,100] for 11 students
         * and stores it in an array of doubles.
         */...

By purchasing this solution you'll be able to access the following files:
Assignment4.zip.

50% discount

Hours
Minutes
Seconds
$18.00 $9.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats