Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been hired by GMU to create and manage their course registration portal. The university is offering six IT courses in Fall 2023. Each

You have been hired by GMU to create and manage their course registration portal. The university is offering six IT courses in Fall 2023. Each course has a course number, course name, credit hour, and current enrollment. The course number must be 5 characters long. The maximum enrollment for each course is 30 students. The current enrollment should be no greater than the maximum enrollment. A course can have a maximum of 4 credit hour. Design and implement a modular solution for the above task. Your solution must have the following methods: Get Course Number: This method should prompt the user for a course number, validate the number, if its invalid show an error message and re-prompt. At the end, the method should return a valid course number.

Get Course Name: This method should prompt the user for a course name. The course name cannot be empty. If the user provides an empty string, show an error message and re-prompt. At the end, the method should return a valid course name.

Get Credit Hour: This method should prompt the user for a course credit hour, validate the input, if its invalid show an error message and re-prompt. At the end, the method should return a valid credit hour.

Get Enrollment: This method should prompt the user for a courses current enrollment, validate the input, if its invalid show an error message and re-prompt. At the end, the method should return the valid input.

Print Course Details: This method should print all the information of the courses entered. This method should also print the maximum and average enrollment over all the courses.

Sample Input/Output Enter Details for Course 01:

Enter Course Number: IT106

Enter Course Name: Intro to Programming

Enter Credit Hour: 4

Enter Current Enrollment: 27

Enter Details for Course 02:

Enter Course Number: IT206

Enter Course Name: OOP

Enter Credit Hour: 4

Enter Current Enrollment: 29

Enter Details for Course 03:

Enter Course Number: IT109

Enter Course Name: Intro. Programming.

Enter Credit Hour: 4

Enter Current Enrollment: 20

Enter Details for Course 04:

Enter Course Number: IT191

Enter Course Name: Computer Fundamentals.

Enter Credit Hour: 3 Enter Current Enrollment: 12

Enter Details for Course 05:

Enter Course Number: IT102

Enter Course Name: Discrete Math

Enter Credit Hour: 4

Enter Current Enrollment: 27

Enter Details for Course 06:

Enter Course Number: IT207

Enter Course Name: Applied IT Programming

Enter Credit Hour: 3

Enter Current Enrollment: 15

Sample output

Enter Course Number: IT123456

Error!! Course Number is invalid must be 5 characters long please re-enter Course number!!

Re-Enter Course Number: IT106

Enter Course Name: Object Oriented Techniques for IT Problem Solving

Enter Credit Hour: 9

Error! Course Credit is invalid course credit can be a maximum of 4 please re-enter Course number!!

Re-Enter Course Credit: 4

Enter Current Enrollment: 35

Error! Course Enrollment is invalid course enrollment can be a maximum of 30 please re-enter Course number!!

Re-Enter Course Enrollment: 20

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

Q.1. Taxonomic classification of peafowl, Tiger and cow ?

Answered: 1 week ago

Question

Q .1. Different ways of testing the present adulterants ?

Answered: 1 week ago

Question

Q.1. Health issues caused by adulteration data ?

Answered: 1 week ago