Question: Using any of the data structures as vector,queue ,singly linked list,double linked list,.... // YOU MAY ADD OTHER CLASSES, VARIABLES, METHODS, ... AS NEEDEd //
Using any of the data structures as vector,queue ,singly linked list,double linked list,.... // YOU MAY ADD OTHER CLASSES, VARIABLES, METHODS, ... AS NEEDEd
// TO BE COMPLETED
#include#include using namespace std; class Enrollment { public: void addUndergraduate(string firstname, string lastname) { std::cout // // EDIT THIS FILE ONLY FOR YOUR OWN TESTING // WRITE YOUR CODE IN Enrollment.h // #include#include #include "Enrollment.h" using namespace std; int main() { Enrollment enrollment; while (true) { cout > choice; // act on user's choice if (choice == 'U') { // an undergraduate student signs-up string firstname; cout > firstname; string lastname; cout > lastname; enrollment.addUndergraduate(firstname, lastname); } else if (choice == 'G') { // an undergraduate student signs-up string firstname; cout > firstname; string lastname; cout > lastname; enrollment.addGraduate(firstname, lastname); } else if (choice == 'P') { // print everyone who is enrolled enrollment.printInOrder(); return 0; // quit the program } else { cout EPP Fall mid-semester 2018 Part2.cpp is an interactive program to manage enrollment in a Computer Science department course. Multiple Graduate and Undergraduate students each sign-up using the program. At the end of the sign-up period, the program prints the list of all students in order according to the following policy All graduate students have higher priority than undergraduates Among graduates and undergraduates, students must be selected in the order they signed-up. . For example, if the following students sign-up Undegraduate: Tommy Titan Undergraduate: Tina Tusker Graduate: Jim Jumbo Undergraduate: Dottie Dumbo Graduate: Bob Babar The students should be printed like so 1. Jim Jumbo 2. Bob Babar 3. Tommy Titan 4. Tina Tusker 5. Dottie Dumbo Complete class Enrollment which should include the following public member functions void addUndergraduate(string firstname, string lastname); void addGraduate (string firstname, string lastname); void printInorder); You can add other member variables, functions, and classes as required. part2.cpp already reads in names from the user. Names have two parts: firstname and lastname (each without spaces). Part2.cpp then calls the above Enrollment methods. Data Structure Resources You are given files containing templates for a Stack class, a Queue class, and a Vector class. For each of the three data structures, you are also provided with a test program. You may use none, any, or all of them if it will help you. You are also free to edit any of these files. All these files are posted in the "EPP Part 2 Files" section on Titanium. You can also use the STL versions of these data structures (e.g., std::vector,... You are also give an example run of the completed program in "sample_output.txt Required documentation: Make clear what, if any, data structures you use and their roles. This should be turned in as a long comment at the beginning of Enrollment.h. Comments If any variable name does not make it immediately clear what its role is, that variable must have comments whenever it is used. o . Any unusual or tricky code should be commented. File upload: Upload along with any other .cpp/.h files that you used EPP Fall mid-semester 2018 Part2.cpp is an interactive program to manage enrollment in a Computer Science department course. Multiple Graduate and Undergraduate students each sign-up using the program. At the end of the sign-up period, the program prints the list of all students in order according to the following policy All graduate students have higher priority than undergraduates Among graduates and undergraduates, students must be selected in the order they signed-up. . For example, if the following students sign-up Undegraduate: Tommy Titan Undergraduate: Tina Tusker Graduate: Jim Jumbo Undergraduate: Dottie Dumbo Graduate: Bob Babar The students should be printed like so 1. Jim Jumbo 2. Bob Babar 3. Tommy Titan 4. Tina Tusker 5. Dottie Dumbo Complete class Enrollment which should include the following public member functions void addUndergraduate(string firstname, string lastname); void addGraduate (string firstname, string lastname); void printInorder); You can add other member variables, functions, and classes as required. part2.cpp already reads in names from the user. Names have two parts: firstname and lastname (each without spaces). Part2.cpp then calls the above Enrollment methods. Data Structure Resources You are given files containing templates for a Stack class, a Queue class, and a Vector class. For each of the three data structures, you are also provided with a test program. You may use none, any, or all of them if it will help you. You are also free to edit any of these files. All these files are posted in the "EPP Part 2 Files" section on Titanium. You can also use the STL versions of these data structures (e.g., std::vector,... You are also give an example run of the completed program in "sample_output.txt Required documentation: Make clear what, if any, data structures you use and their roles. This should be turned in as a long comment at the beginning of Enrollment.h. Comments If any variable name does not make it immediately clear what its role is, that variable must have comments whenever it is used. o . Any unusual or tricky code should be commented. File upload: Upload along with any other .cpp/.h files that you used
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock

