Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 8: Create a Course class that contains the name of the course, and a list of all the students that are currently registered in

image text in transcribed Question 8: Create a Course class that contains the name of the course, and a list of all the students that are currently registered in the course. The name of the course and the maximum number of students allowed to register for the course will be passed in through the constructor. This class will contain methods that allow students to register and withdraw from the course. Students are not allowed to register if they have already registered for the course, or If the course is full. The Student class must keep track of the student's name, their year of study and if they are a CS student or not. When a student is created they are assigned a unique id starting at 200. Include accessor/mutator methods for both the Course and Student classes. Create driver that creates some students and a course. and reads in information about students and registers each of them. Test your methods by trying to add more students than the class will hold, try adding students twice (to make sure they are only added the first time and not the second time they try to register), try removing students that were successfully registered and those who were not. Print out the class list at different points in your driver to see if it is working properly

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

Step: 3

blur-text-image

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

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions