Question: 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.

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.

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!