Question: code in C++ language Problem 2: Re-implement Course information as a class DATA ATTRIBUTES OF CLASS COURSE INFO In this lab you will modify structure

code in C++ language code in C++ language Problem 2: Re-implement Course information as a classDATA ATTRIBUTES OF CLASS COURSE INFO In this lab you will modify

Problem 2: Re-implement Course information as a class DATA ATTRIBUTES OF CLASS COURSE INFO In this lab you will modify structure created in Lab #10 and will create a class course info Class course info would have the following data attributes: University course identification number (5 digits 1 char for semester) string Department that offers this course (enum) Days of the week the course meets (enum) Times the course meets (enum) Number of credits for the course (int) Maximum course enrollment (int) Name of the course instructor (string) Number of students currently enrolled (int) Course status: open, closed, canceled, unknown (enum) MEMBER FUNCTIONS OF CLASS COURSE INFO Constructors: You must have three constructors Default Constructor sets all attributes to default values. Note: it is a good idea to have such values as no days, no times, no dept, and unknown for the enumerated data types days of the meeting, times of the meeting, department, and status. These values would be your default values Class constructor takes the following parameters Course ID Department Number of credits Maximum course enrollment The rest of the of the parameters are set to default values Class constructor takes parameters for all the data members of the class (except status). None of the data members of the class are set to the default values. Modifiers and Vo Functions: Your class must have a display function that displays the course information (e.g. the values of all data attributes). (Vo function) For each of the above data attributes, except course status need to write two functions s, you input retrieves values of corresponding data attribute from the user (vo functions) Set sets the value of corresponding data attributes based on the passed value. CModifier functions) Both of these functions must validate the data to ensure that the data attributes assigned valid entries More specifically University course ID must consist of 5 digits and one character. The last character must be F, W, S, or U. Department, meet days, and meet times must be valid based on the definition of corresponding enumerated data types Number of credits must be more than 0 but less than or equal to 15

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!