Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please writing as JAVA language Objective: In this assignment, we ask you to implement a student grade calculation program. Step 1. Your program will get

image text in transcribedimage text in transcribed

image text in transcribed

please writing as JAVA language

Objective: In this assignment, we ask you to implement a student grade calculation program. Step 1. Your program will get add(adding a grade for a student) commands. User can enter an add command as below: add add add and so on. Note: Please, note that if the StudentiD is entered for the first time, you need to add Student first. Otherwise, you need to add the grade to the existing student. There can be up to 10 grades for a student. Note: Studentin needs to be at this format: 2 digits number, 3 characters, 5 digits number For example, 12ABC12345. If the format is wrong, the program will give a wrong input message. Step 2. After adding all grades, your program will get calc(calculating the average) commands. With this command, your program will calculate the average for the entered grades for a student. Simply, you will sum up all grades, and divide by the total number of grades for that student. User can enter a calc command as below: calc The output will be as follows: : Note: Please cast the average to integer and print integer result. Step 3. At this exercise, the input will NOT be error free. This means that we will test your program with incorrect or unexpected inputs. Hence, you need to check as many cases as you can to provide a robust program. Your outputs should be as follows in case of exception: If the input commands are wrong: "Wrong input." If the student doesn't exist for calc command: "Student not found." For any other case: "Exception." Step 4. Program will quit when the user enters q. Submit all files in your program. You are free at your designs. But you can submit maximum 3 files. Good luck. Expected output will be as follows: (Bold text represents the inputs) Enter command: add 09DEF45678 80 Enter command: add 09DEF45678 90 100 Enter command: add 09DEF45678 70 Enter command: calc 09DEF45678 09DEF45678: 85 Enter command: acc 09XYZ67890 55 Wrong input. Enter command: add 111 Wrong input. Enter command: calc 09XYZ67891 Student not found. Enter command: Enter command: add 69DEF45678 80 Enter command: add 69DEF45678 90 100 Enter command: add 9DEF45678 70 Enter command: calc 99DEF45678 89DEF45678: 85 Enter command: acc @9XYZ67890 55 Wrong input. Enter command: add 111 Wrong input. Enter command: calc 99XYZ67891 Student not found. Enter command: : 9

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions

Question

Write a letter asking them to refund your $1,500 down payment.

Answered: 1 week ago