Menu

Use Java Java Class Need Implement Student Class Least Following Methods Public Class Stud Q43871158

USE JAVA*

Java class

You need to implement a Student class with at least thefollowing methods.

public class Student { /* Constructs a student record with name and student number. */ public Student(String name, String number) throws Exception; /* Get the student number */ public String getNumber(); /* Get the student name */ public String getName(); /* Print the student record */ public void print();}

The Java class Course has a name, and can hold multiplestudents.

pulic class Course { /* Construct a course. */ public Course(String name) throws Exception; /* Find the name of a student by their number */ public String find(String number); /* Enroll a student into the course */ public void enroll(String name, String number) throws Exception; /* Prints the course and students */ public void print();}

public class Main {
public static void main(String[] args) throws Exception {
Student s = new Student(“Jack”, “100”);
s.print();

Course c = new Course(“Compilers”);
c.enroll(“Jack”, “100”);
c.enroll(“Jill”, “200”);
c.print();
}
}

Expert Answer


Answer to USE JAVA* Java class You need to implement a Student class with at least the following methods. public class Student { /…

OR