Write a C++ program that defines an abstract data type course for modeling courses offered in a university each semester. The class contains: • Data fields of type: o O ● string that represents course id number int that represents section number int that represents number of credits for the course string that represents day the course meets string that represents time the course meets O string that represents building the course meets O o o int that represents room number O int that represents maximum course enrollment. o string that represents course instructor O int that represents number of students currently enrolled¹*. Starting from 0, this number is incremented by one when a student is enrolled in the course. o enum that represents course status (open, closed). Initially, a course is open until it reaches the maximum enrollment and then it becomes closed. O o string array named studentsId that contains IDs of students who are enrolled in the course ¹*. Member functions: o A default constructor. The default value for maximum course enrollment is 5. o A constructor that initializes a course object with the specified values. The last three fields are initialized with the same values as they are initialized by the default constructor. o The accessor and mutator functions for all the data fields. The accessor of studentsId filed returns one student id when it receives an index of the array. o A print function named displayData to display all information related to a course object in a well-formatted fashion including a brief description for the fields. This function excludes displaying information relevant to enrolled students. A print function named displayStudent List to display (in a well-formatted fashion) IDs of students who are enrolled in the course. If no one is enrolled in the course, it will print "No students are enrolled for this class!"
Write a C++ program that defines an abstract data type course for modeling courses offered in a university each semester. The class contains: • Data fields of type: o O ● string that represents course id number int that represents section number int that represents number of credits for the course string that represents day the course meets string that represents time the course meets O string that represents building the course meets O o o int that represents room number O int that represents maximum course enrollment. o string that represents course instructor O int that represents number of students currently enrolled¹*. Starting from 0, this number is incremented by one when a student is enrolled in the course. o enum that represents course status (open, closed). Initially, a course is open until it reaches the maximum enrollment and then it becomes closed. O o string array named studentsId that contains IDs of students who are enrolled in the course ¹*. Member functions: o A default constructor. The default value for maximum course enrollment is 5. o A constructor that initializes a course object with the specified values. The last three fields are initialized with the same values as they are initialized by the default constructor. o The accessor and mutator functions for all the data fields. The accessor of studentsId filed returns one student id when it receives an index of the array. o A print function named displayData to display all information related to a course object in a well-formatted fashion including a brief description for the fields. This function excludes displaying information relevant to enrolled students. A print function named displayStudent List to display (in a well-formatted fashion) IDs of students who are enrolled in the course. If no one is enrolled in the course, it will print "No students are enrolled for this class!"
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...
Related questions
Question
In C++
Expert Solution
Step 1
please find the above solution of the given question
Step by step
Solved in 5 steps
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY