Question: Please help in Java Main.java Student.java The fields in the Student.java class should be: private String name; private int[] grades; Create a constructor for the

Please help in Java

Main.java

Student.java

The fields in the Student.java class should be:

private String name;

private int[] grades;

Create a constructor for the student that accepts both name and number of grades, For example:

Student("John Doe", 3); //Three grades for John Doe

In your Main.java, have code similar to this:

System.out.println("Code by YOUR NAME"); //Always do this on all coding assignments!

...

Student[] students = new Students[3];

students[0] = new Student("John Doe", 3); students[0].setGrade(0, 95); students[0].setGrade(1,97); students[0].setGrade(2,100);

.... repeat for "Jane Smith" and "Billy Bob"

for (Student s : students) { /// Print something like this: John Doe: 95, 97, 100 }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!