May 2018
Intermediate to advanced
328 pages
8h 15m
English
In order to implement the simulation of the customer service office as required, we could use several helper classes. ticketing_machine is a class that models a very simple machine that issues incremental ticketing numbers, starting with an initial, user-specified seed. customer is a class that represents a customer that enters the store and receives a ticket from the ticketing machine. operator< is overloaded for this class in order to store customers in a priority queue from which they should be taken in the order given by their ticket number. In addition, the logger class from the previous problem is used to print messages to the console:
class ticketing_machine{public: ticketing_machine(int const start) : ...Read now
Unlock full access