
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
Sample Output:
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.