Based on your assignment 1, you are asked to rewrite the Java program with Object-oriented programming. The program should be consisted of 3 classes (Student, Course and a driver class that contains the main() method). Use a class diagram to show the relationship of your classes.
The input file format will be the same as the one in assignment 1. A general format of input text file depicts below:
Student ID, Student name, marks for assignment 1, percentage of assignment 1, marks for assignment 2, percentage of assignment 2,
[Student ID], [Student Name], Asg 1, 10, Asg 2, 10, Midterm, 40, Final, 40 01234567, Timture Choi, 99.5, 97, 100.0, 99.0 02345678, Elaine Tam, 89.5, 88.5, 99.0, 100
The first row denotes the names of all assessments of one course. Then, each student record presents in a line. All fields are separated by commas.
Here is a sample output from the input file shown above, similar format as in the assignment 1.
The Rank column is the ranking of each student according to the Overall score.
The output should be sorted by the rank in ascending order.
ID Name Asg 1 Asg 2 Midterm Final Overall Rank 01234567 Timture Choi 99.50 97.00 100.00 99.00 99.30 1 02345678 Elaine Tam 89.50 88.50 99.00 100.00 97.40 2 Average: 94.50 92.75 99.50 99.50 98.30
Your program should be able to process as many as possible students’ data, which are all contained in one input file as shown in the example.
In addition to output student records, your program should calculate the averages for each individual assessment.
Please be reminded that all numbers except the rank are displayed with 2 decimal places.
- Your program will process one file for each run.
- Each file contains only one course information.
- Rank the students’ result within a course.
- There is no comma in between surname and first name.
- The length of student id is fixed at 8 characters long.
- The length of student name is fixed at 20 characters long.
- Zip your programming files (java source code and class file), and name the zip file as your student’s ID, for example 20123456.zip.
- Make a screen dump for the program result.
- Draw the class diagram for your program.
- Upload your submission (1, 2 and 3) on Canvas.
- Late submission is not allowed.
- Plagiarism (Copying) is a serious concern. Students might search for information on the Internet and “Copy & Paste” it directly in their assignments. Hence, a strict rule is applied that MORE THAN SEVEN WORDS copied from a source is considered as a cheating. The minimum penalty is zero marks for the particular assignment.
- Basic requirements from assignment 1 (30%)
- Ranking and sorting (20%)
- Effective use of Classes for different types of information/actions (20%)
- Programming style, program performance and use of comments (15%)
- Exceptions handling (15%)