Question: Create a new Java class named Gradebook that has the following fields: String[] labels - category of grades String[] ids- student IDs in[][] grades -
Create a new Java class named Gradebook that has the following fields: String[] labels - category of grades String[] ids- student IDs in[][] grades - grades for each student In addition, the Gradebook class should have the following methods. Constructor - The constructor should accept a File and initialize both the labels and grades from the file The data in the file are organized as follows: 1. the first two numbers (N, M) indicates the numbers of student and the number of grades for each student 2. then followed by M names of each category of the grades 3. then followed by M student IDs 4. then following by N*M integers that represent the M grades for each student public void print() that prints the gradebook in the following format: ID Lab1 Lab2 Test1 Midterm Unweighted Average ---------------------------------------------------------------------------------- 001 88 98 100 98 96.00 002 99 100 99 100 99.50 003 66 66 66 66 66.00 ------------------------------------------------------------------------------------ Average: 84.33 88.00 88.33 88.00 87.17 Minimum: 66 66 66 66 Maximum: 99 100 100 100 Once completed, copy the following code to the main() method to test your program: File file=new File(args[0]); Gradebook gb=new Gradebook(file); gb.print() | |
| | |
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
