Create a package named cs520.hw4.part2. Using this package, create the following classes.
1. Create a class named Student as follows. The class keeps track of the student√Ę‚?¨‚?Ęs homework grades.
a. The instance (or member) private variables √Ę‚?¨‚?? name (String), homework1, homework2, homework3, homework4, homework5 and homework6 (all of type integer).
b. A single constructor with name as its argument.
c. The public set methods for the six homework instance variables. The get methods are optional.
d. A public computeAverage method which takes no arguments and returns a double showing the average homework grade for this student.
e. Override the toString method to return the string representation of this object in the format √Ę‚?¨Ň?The
Display the string representation of the currentStudent object to the console.
Sample Input data.txt file:
Alice,44,79,85,72,77,57 Bob,79,94,70,71,71,51 Charlie,95,99,41,55,65,50 Dave,87,89,88,55,74,63 Ed,82,51,44,67,73,49
Alice's average grade is 69.00 .....
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.