Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having trouble making the header file for this lab. There is no more information given despite the statement In this lab you will modify

I'm having trouble making the header file for this lab. There is no more information given despite the statement "In this lab you will modify structure created in Lab #10.."

Structure Code (I think):

int main() {

//Declarations are omitted

//Make sure to declare a 10 element array to store the University Courses and an empty 3 element result array ...

//Start do-loop

//START For-LOOP and process until all 10 elements are filled

// Input course info and process it on the input process_course_info(...);

//Store the university_Course in all courses array

// Arguments passed into the function are omitted

//END For-LOOP

// Display the course with largest enrollment

print_course_info (max_enrollment_course); //you will have to find the max enrollment course FIRST

print_course_info (min_credits_course); //you will have to find the min credits course FIRST

//Ask user for a department, a day, a meet time, and semester

//and pass these as arguments to find_courses

//Loop over the result array and print info, if it is empty nothing should print other than the error message

//End Do-loop, looping until user chooses to exit by entering Q or q

return 0;

}

image text in transcribedimage text in transcribed

Problem 2: e-implement Course information as a class R (20 points) 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 CLASSCOURSE 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 ofthe class are set to the default values. Modifiers and IO Functions: Your class must have a display function that displays the course information (e the values of all data attributes). (IAO function) For each of the above data attributes, except course status, you need to write two functions: input retrieves values of corresponding data attribute from the user (I/O functions) sets the value of corresponding data attributes based on the passed value. (Modifier Set 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

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago