Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA PLEASE. Cannot use an array list, only single dimension and two-dimension arrays allowed. In this project, you will write a program called GradeBook that

JAVA PLEASE.

Cannot use an array list, only single dimension and two-dimension arrays allowed.

In this project, you will write a program called GradeBook that will calculate the grading statistics for any number of students up to 200 students. We can assume that there are only three types of grade items (tests, quizzes, and homework.)

GradeBook start out by asking for the number, the possible points, and the weight of each grade item. For example, if there are three tests of each with 100 possible points and tests weight 60%, the user would enter 3 100 60 as the input.

Once the GradeBook has the grade item information, it then provides the user a menu to perform various tasks. The user could add student data, display student data and grades, display class statistics, or plot grade distribution.

Add student data: The user can add student data by choosing add student data. It should allow the user to add students up to 200 students. Once the user is done adding, the user enters done instead data. The user can always return to adding more students later on. Data are entered as a sequence of lines where each line represents data for one student. Each line consists of the students name and grade for each grade item.

Scores are entered with a character in front, which tells the program what type of score it is. The letters are e for test, q for quiz, and h for homework. The scores may be entered in any order. Missing scores are considered zero. For example, Michael Brown only has one test score, which means his other two test scores are 0.

Example: Entering data for Joe W. Smith and Michael Brown. There are three tests, three quizzes, and three homework assignments.

Joe W. Smith: e100 e95 e87 q10 q10 q8 h10 h10 h10

Michael Brown: q10 q10 h7 h10 h9 h10 e80

Display student data and grades: This option displays the students with their data and grade sorted by name.

Display class statistics: This option displays the min, max, and average of each grade item and the final grade. Plot grade distribution: This option plot students grade distribution. The y-axis is the range of grades (0-9, 10- 19, 20-29, 30-39, 40-49, 50-59, 60-69, 70-79, 80-89, 90-100). The x-axis is the number of students. For example, if there are three students with grades in the range of 70-79, three stars will be printed next to the range as followed:

70-79 |***

See sample run to have a better idea of what the program should do.

Grading:

Your program will be graded on a ten-point scale. Your program is expected to have comments. Comments include your name, and purpose of the program. Also comment code that is not obvious. Your program should be beautifully format, well designed, and efficient. Your program must use methods. You will decide on the method names and parameters. Your program should perform as described on the handout. Try to match your output with the same run.

Rubrics

Points are assigned as followed:

Program design, format, style and efficiency: 1 point

Correctness: 9 points

Program design (methods, parameters) (1 point)

Add student data (3 points)

Display student grades and statistics (2 points)

Display class statistics (2 points)

Grade distribution (1 points)

Submission:

Submit the .java file on BlackBoard. Your grade will be penalized 1 point if you submit .class file instead.

Sample Run:

Welcome to GradeBook!

Please provide grade items details

Tests (number, points, weight):3 100 60

Quizzes (number, points, weight):3 10 30

Homework (number, points, weight):4 10 10

What would you like to do?

1. Add Student Data

2. Display Student Grades & Statistics

3. Display Class Statistics

4. Plot Grade Distribution

5. Quit

Enter Choice: 1

Data> Joe W. Smith: e100 e95 e87 q10 q10 q8 h10 h10

Data> Micheal Brown: q10 q10 h10 h10 h10 e100

Data> Steven Henson: e5 h5 q10

Data> Don Miller: e100 e100 e100 h10 h10 h10 h10 q10 q10 q10

Data> Joe:

Data> done

What would you like to do?

1. Add Student Data

2. Display Student Grades & Statistics

3. Display Class Statistics

4. Plot Grade Distribution

5. Quit

Enter Choice: 2

Name E E E Q Q Q H H H H G L

Don Miller 100 100 100 10 10 10 10 10 10 10 100.0 A

Joe 0 0 0 0 0 0 0 0 0 0 0.0 F

Joe W. Smith 100 95 87 10 10 8 10 10 0 0 89.4 B

Micheal Brown 100 0 0 10 10 0 10 10 10 0 47.5 F

Steven Henson 5 0 0 10 0 0 5 0 0 0 12.25 F

What would you like to do?

1. Add Student Data

2. Display Student Grades & Statistics

3. Display Class Statistics

4. Plot Grade Distribution

5. Quit

Enter Choice: 3

Min Max Average

Tests 5 100 45

Quiz 8 10 5

Homework 5 10 4

Grade 0.0 100.0 49.829

---------------------------------------

What would you like to do?

1. Add Student Data

2. Display Student Grades & Statistics

3. Display Class Statistics

4. Plot Grade Distribution

5. Quit

Enter Choice: 4

0-9 |*

10-19 |*

20-29 |

30-39 |

40-49 |*

50-59 |

60-69 |

70-79 |

80-89 |*

90-100 |*

What would you like to do?

1. Add Student Data

2. Display Student Grades & Statistics

3. Display Class Statistics

4. Plot Grade Distribution

5. Quit

Enter Choice: 1

Data> Will Smith:e100 e100 e100 q10 q10 q10 h10 h10 h10 h10

Data> done

---------------------------------------

What would you like to do?

1. Add Student Data

2. Display Student Grades & Statistics

3. Display Class Statistics

4. Plot Grade Distribution

5. Quit

Enter Choice: 4

0-9 |*

10-19 |*

20-29 |

30-39 |

40-49 |*

50-59 |

60-69 |

70-79 |

80-89 |*

90-99 |**

What would you like to do?

1. Add Student Data

2. Display Student Grades & Statistics

3. Display Class Statistics

4. Plot Grade Distribution

5. Quit

Enter Choice: 5

Goodbye!

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions