Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions