You want to create a program to enroll in classes. You've narrowed the class list down to just a few classes that computer science students might need. In your program, first the user will select a department and the program will tell them what classes are available from that department. Then the user picks a class, and the program will tell them what sections are available. After the user picks a section, the program will print a success message.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

You want to create a program to enroll in classes. You've narrowed the class list down to just a few classes that computer science students might need.

In your program, first the user will select a department and the program will tell them what classes are available from that department. Then the user picks a class, and the program will tell them what sections are available. After the user picks a section, the program will print a success message.

The departments, classes and sections are as follows:

 

Sample run:

Select a department: (1)Computer Science (2)Math (3)Science 1 Select a class: (1)Starting Computing (2)Data Structures (3)Algorithms 3 Select a section: (1)Section 102 (2)Section 202 1 You've been enrolled in Section 102 of Algorithms!

The user should input an integer in the range of the choices you give them. For example, a user cannot input 3 if you only present 2 choices.Ensure you are doing input validation. Your program should output Please enter a valid input. if the user inputs something they cannot and exit the program.

Example of input validation:

Select a department: (1)Computer Science (2)Math (3)Science 5 Please enter a valid input.

Make sure to submit your code on Coderunner (accessed through Canvas) as well as the final Zip file submission.

The file should be named as classRegistration.cpp.

 

Department
1. Computer Science
2. Math
3. Science
Class
1. Starting Computing
2. Data Structures
3. Algorithms
1. Calculus 1
2. Calculus 2
3. Linear Algebra
1. General Chemistry 1
2. Physics 1
Sections
Section 100
Section 200
Section 101
Section 201
Section 102
Section 202
Section 400
Section 500
Section 401
Section 501
Section 402
Section 502
Section 700
Section 800
Section 701
Section 801
Transcribed Image Text:Department 1. Computer Science 2. Math 3. Science Class 1. Starting Computing 2. Data Structures 3. Algorithms 1. Calculus 1 2. Calculus 2 3. Linear Algebra 1. General Chemistry 1 2. Physics 1 Sections Section 100 Section 200 Section 101 Section 201 Section 102 Section 202 Section 400 Section 500 Section 401 Section 501 Section 402 Section 502 Section 700 Section 800 Section 701 Section 801
You want to create a program to enroll in classes. You've narrowed the class list down to just a few classes that computer science students
might need.
In your program, first the user will select a department and the program will tell them what classes are available from that department. Then
the user picks a class, and the program will tell them what sections are available. After the user picks a section, the program will print a
success message.
The departments, classes and sections are as follows:
Department
1. Computer Science
2. Math
Class
1. Starting Computing
2. Data Structures
3. Algorithms
1. Calculus 1
2. Calculus 2
3. Linear Algebra
Sections
Section 100
Section 200
Section 101
Section 201
Section 102
Section 202
Section 400
Section 500
Section 401
Section 501
Section 402
Section 502
Transcribed Image Text:You want to create a program to enroll in classes. You've narrowed the class list down to just a few classes that computer science students might need. In your program, first the user will select a department and the program will tell them what classes are available from that department. Then the user picks a class, and the program will tell them what sections are available. After the user picks a section, the program will print a success message. The departments, classes and sections are as follows: Department 1. Computer Science 2. Math Class 1. Starting Computing 2. Data Structures 3. Algorithms 1. Calculus 1 2. Calculus 2 3. Linear Algebra Sections Section 100 Section 200 Section 101 Section 201 Section 102 Section 202 Section 400 Section 500 Section 401 Section 501 Section 402 Section 502
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY