Question: Please Programing on C++!! Your files should include course.cpp, course.h, exectuive.cpp, exectuive.h. AND THE main.cpp file is ALREADY defined!! 1.File format The file will start

Please Programing on C++!!

Your files should include course.cpp, course.h, exectuive.cpp, exectuive.h. AND THE main.cpp file is ALREADY defined!!

1.File format

The file will start by indicating how many courses will be in the file.

Each course follows the format of

Department code

Course number

Number of students in the class

List of student ids (5-digits with no leading zeroes)

Sample file

3 EECS 268 5 12345 54321 68454 75984 15348 MATH 521 3 47896 41236 45826 BIO 101 4 96369 85525 14741 98754 

Please note, when we test your program we will use new, larger, and more complex files than the sample one provided.

I encourage you to come up with your own test files.

You may assume the files will be properly formatted.

2.User Interactions

The user will launch your program and pass in the file name containing the course data from the command line (recall argv and argc).

Once the file is read in, provide the user with a menu in order to do the following:

1.Print all courses

The order they appear will be the same order they appeared in the file

Print all course names (department and number) from the file

Do not print student ids

2.Print all courses for a department

Obtain a department code from the user then print all courses in that department

When printing a course, print the department code and number

3.Print roster for a course

Print all the student IDs for a course. Delimit the ids with commas

4.Print largest class

Print the name of the largest class and the amount of students in that class

5.Swap two classes

Obtain two class names (department and number) from the user and swap their positions in the catalog

If all courses are printed after this, you should see that the two courses swapped positions

6.Print schedule for student

Obtain a student ID from the user and print the names of all courses that student is enrolled in

7.Exit the program

3.

main.cpp

Main will be in charge of very little. It will include the needed files, but as soon as possible it will hand control over to the the Executive class.

You main can verify the proper number of command line parameter, but after that it should give control to the Executive class.

int main(int argc, char* argv[]) { if(argc < 2) { std::cout << "Incorrect number of parameters! "; } else { Executive exec(argv[1]); //sample creation of executive object exec.run(); //presumably handles the calling of all other member methods } return(0); }

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!