Question: Use JAVA to Design a simple registration system that allows Student to register in a course. Requirements using 2 classes: class Student & class Course

Use JAVA to Design a simple registration system that allows Student to register in a course.

Requirements

  • using 2 classes:class Student&class Course.
  • Implement the scenarios inclass Tests main method.
  • Each student has anameand anidvariable.
  • Each object of class Student is initialized using values ofnameandidpassed to constructor.
  • Class Student hasgetmethods for its instance variables.(getters and setters)
  • Each Course has aname, and a variablenumberOfStudentrepresenting the number of registered students.
  • A course can have a maximum number of 10 students registered in it.
  • Class Course store the registered students in students which is an array of type Student. When a student register in a course, he is added to the array. Each object of class Course is initialized using the title(name).
  • Class Course has the following methods:
    • method getStudents(): return the array of registered students;
    • method boolean isFull(): return true if the course is full,
    • get method for the name and numberOfStudent field;
    • method registerStudent (Student student): if the course is not full, register a student in course.

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 Programming Questions!