Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description Implement a simple grade management program. Grades are stored as real number grade points (4.0, 3.7, 3.3...0.0). Array elements that are occupied will contain

Description

Implement a simple grade management program. Grades are stored as real number grade points (4.0, 3.7, 3.3...0.0). Array elements that are occupied will contain a grade within this range. For example, this array would be assumed to contain 4 grades (values outside the valid range represent 'unoccupied' elements): 3.3, 4.0, 2.7, 0, -1, -1, -1... The program includes basic statistical generation (average) and visualization of the data (query for the highest and the lowest grade). There is no requirement for including user input of the grades but the program must include the ability to initialize grades (hard-coded or random). The program will employ a text-based menu-driven interface.

Technical details

The program consists of 3 classes:

  • Driver: starting execution point.

  • UserInterface: responsible for displaying all menus, getting user input and determining the appropriate course of action. The Teaching Assistants have covered this type of class before. Although the ["GameInterface class"] in the "Dice example" covered in tutorial (Jan. 24 - 30) was less complex it can still be used as a starting template the class you write for this assignment.

  • Manager: stores the grades (1D array of double: maximum of 40 elements). While the user-interface class may be responsible for determining which option was selected by the user (e.g., display list, find highest grade etc.) only the manager class that can directly access or change the grade information. That's because the information (grades) is a property of the manager, the grade information is what the manager manages.

Program features

Some of the marks you are awarded will be determined by your adherence to the stylistic conventions taught in class as well your program documentation. Also all output should not only be correct but the results should be clear, reasonably neat and presentable. The real number portion of a grade should only be displayed to one place of precision (e.g. 3.0 and not 3.00). The bulk of your credit will come from implementing the following features.

  • Array has each element initialized to starting value outside the range of valid values (e.g., -1).
  • A main menu of program options is displayed: average grade, display grades, find highest, find lowest, random and fixed initialization of list, the ability to quit the program. (JT: To clarify I should have added an option to initialize the first 10 array elements as well).
  • Get user selection (of the options at the main menu).
  • Program runs until the user selects the option to quit the program (display menu, get user input, execute user selected option...this cycle repeats until the user quits).
  • Display the contents of the list (you only get credit for one version)
  • Basic version: displays all the grades in the list.
  • Advanced version: only displays list elements that contains a valid grade i.e., if the list only contains 10 grades then only the first 10 elements will be displayed. The ability to only display occupied elements should be determined by the actual number of occupied elements at run-time and not set to a hard-coded value.
  • Assign a fixed grade of 2.0 to all array elements. Previous values are overwritten.
  • Assign grades to the first 10 list element randomly. To make it simple randomly assigned grades can consist only of integer values ranging from zero to four. Previous values are overwritten.
  • Calculate and display the average grade.
  • Determine and display the highest grade in the list.
  • Determine and display the lowest grade in the list.

UML class diagram

You should create a UML diagram for class "Manager" and class "UserInterface". All information for a class should be specified (e.g., attributes, methods, parameters, return values, permission levels). Also the relationship between the two classes include multiplicity (see the notes which introduce Object-Oriented concepts) should be specified. The class diagram can be drawn using any structured drawing program (even PowerPoint). However the diagram must be correct and it must be understandable/readable by the marker. The image that you submit via D2L must be in one of the following formats: 'gif', 'jpg', 'png' or 'pdf''. Also if the marker cannot open your file then you won't get credit (you should check it).

write in java please

Need the code right now will be very grateful if can answer asap

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_2

Step: 3

blur-text-image_3

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

What are the two ways of calculating the slope of a curved line?

Answered: 1 week ago

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago