Question: How can I create this java application? - Consider a class with 20 Students, create a letter grade calculator which will have following Class structure.
How can I create this java application?
- Consider a class with 20 Students, create a letter grade calculator which will have following Class structure.
Assignment.java
An Assignment will represent every assignment within the MIS 2201 Class whether it is Homework, Lab Question, Normal Question or Lab for a single student. (For example, your own normal question Q1 grade) It will have following fields (attributes):
1. Name of the Assignment
2. Grade (0 - 100)
3. Percentage of the assignment within total course grade (double: 0.00 1.00)
It also must have following operations:
1. toString() : Displays assignments name - grade and its respective percentage.
StudentTasks.java
StudentTasks will represent all the assignments done by a particular student and will have:
1. An array of assignments that includes every assignment given in the lecture.
Methods to be implemented:
1. CheckTotalPercentage () : Checks if the total percentage of all assignments is between 0.00 1.00 with the new grade is added.
2. Add Assignment (): Tries to add a new assignment for the course with a percentage and if total percentage will not exceed 1.00 new grade is added.
Will throw ExcessPercentageException if total percentage > 1.00
3. Calculate Weighted Sum (): Calculates the weighted sum for the course. If the total percentage is lower than 1.00 it returns -1.
Will throw InsufficientWeightException if total percentage < 1.00
4. - ToString() : Displays all the assignments and their scores for a single student.
Student.java
Student class has following attributes:
1. Name (String)
2. Surname (String)
3. assignments (StudentTasks)
It will also include following methods:
1. Print Assignments: Print out all the assignments completed by the student and their respective grades.
2. Add Assignment: Will add another assignment for the student.
3. toString: Prints out ID Name Surname and all the assignments completed by the student as well the course grade if total percentage is reached 1.00 (100%)
Two student objects are said to be duplicate when name and surnames of the two objects are identical.
GradedStudent.java
A class which is created from a Student Object when all the grades of a particular student is entered (when we can calculate weighted Sum), this will convey information on which student got which letter grade.
GradedStudent has following attributes (GradedStudent.java)
1. FullName (String)
2. LetterGrade (String)
It also has Following Methods:
1. toString: Prints out Full Name and letter grade of that student.
Two GradedStudent objects are said to be duplicate when full name and lettergrades of the two objects are identical.
ProgramMenu.java
Create an interactive menu using Swing objects which will consist the following functionalities.
Your Menu is required to have following Options:
1. Add a new Student.
2. List all Students.
3. Add A Grade for a student
4. Display a particular student. (Find by name and surname)
5. Finish Grades for a particular student (Which must create a GradedStudent Object from a Student object.)
6. Display all Graded Students.
7. Find Duplicate records (Should find if there are duplicated students for both Student and GradedStudents, listing is not required! - duplicate means same name and surname or same fullname) using a generic method which works with both student and GradedStudent classes.
Within Menu throw InvalidMenuSelectionException if user enters an invalid selection number.
You are required to try / catch ExcessPercentageException, InsufficientWeightException, InvalidMenuSelectionException , InputMismatchException (Already defined within Java!) and IndexOutOfBoundsException(Already defined within Java!) while implementing your user menu.
Finally create a Main class to test your application.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
