Question: Write codes in C++ a. c. Create the file SharedPrinter.cpp to add your implementation for steps 1 thru 4. Perform the following steps to solve
Write codes in C++



a. c. Create the file SharedPrinter.cpp" to add your implementation for steps 1 thru 4. Perform the following steps to solve the activity. 1. Create a class called Job Data members: comprising an ID for the job, the name of the user who submitted it, and the number of pages. b. The ID should be increased as a new job is instantiated, use a static data member count variable to make the update. Overload the cout stream operator as the internal data structure to store and process jobs. This will provide an interface to add new jobs and process all the jobs added so far. 3. To implement the Printer class, it will need to store all the pending jobs. We will implement a very basic strategy first come, first served. Whoever submits the job first will be the first to get the job done. 4. Finally, simulate a scenario where multiple people are adding jobs to the printer, and the printer is processing them one by one. (See the Unit Test section below) Unit Test Use the main below to test your solution implemented in steps 1 thru 4. int main() { Printer printer; Job ji("John", 10); Job j2 ("Jerry", 4); Job j3("Jimmy", 5); Job j4("George", 7); Job j5("Bill", 8); Job j6("Kenny", 10); printer.addNewJob(j1); printer.addNewJob(j2); printer.addNewJob(j3); printer.addNewJob(34); printer.addNewJob(35); if (not printer.addNewJob(j6)) // Can't add as queue is full. { std::cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
