Question: Course: Data Structures and Algorithms ( CS600A.SS21) Registering Students for Classes This assignment is to create a simple simulation of students registering for courses. Each

Course: Data Structures and Algorithms ( CS600A.SS21)

Registering Students for Classes

This assignment is to create a simple simulation of students registering for courses.

Each student will be represented by an object. Each course will be represented by an object.

For this simulation there will be twenty (20) students, and five (5) courses.

Each student will have an id number, and a list of courses. A student can enroll in a maximum of three (3) courses.

Each course will have a course number, and a list of students enrolled in the course. A course will have a maximum enrollment of twelve (12) students.

Registration requests will be represented by an object that contains a students name, id number and the id number of the course being requested. There should be sixty (60) unique course requests.

Since there are only 20 students you can use the integers from 0 to 19 as the student id numbers.

Since there are only 5 courses you can use the integers from 0 to 4 as the course numbers.

1. Create a class to represent a student.

2. Create a class to represent a course.

3. Create a class to represent an enrollment request.

4. Generate 60 registration requests. Use a random number for the student id and a random number for the course id.

5. Process each registration request. A registration request should be denied if the student is already enrolled in 3 courses, or if the requested course already has 12 students enrolled.

Output:

1. A list of students. For each student print a list of the courses that the student has enrolled in.

2. A list of courses. For each course print a list of the students who have registered for that course.

3. A list of requests that indicates if the request was successful or not.

(N/B: Algorithm and code are needed).

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