Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started