Menu

[Solved]Java Class Course Course Class Define Course Class Contains String Data Field Named Course Q37285840

JAVA Class – (Course: The Course class) Definethe Course class that contains:

 The String data field named courseName the name of thecourse.

 The String[] data field students An array to store thestudents for the course.

 The int data field numberOfStudents the number of students(default: 0).

 The double data field height the height of the person ininches, with get and set methods.

 A constructor that creates a course with the specified name(courseName: String).

 A String method getCourseName() that returns the coursename.

 A void method addStudent(String student) that adds a newstudent to the course.

 A void method dropStudent(String student) that drops a studentfrom the course.

 A String[] method getStudents() that returns the students inthe course.

 A int method getNumberOfStudents() that returns the number ofstudents in the course.

Create and explain source code

NOTE: The student are saved in a Stringarrangement (Array).
For each previous class you should build the test classdemonstrating that each implemented method works.

Expert Answer


Answer to JAVA Class – (Course: The Course class) Define the Course class that contains:  The String data field named courseNam… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *