Skip to content


Do you have a similar question? Our professional writers have done a similar paper in past. Give Us your instructions and wait for a professional assignment!        

QuestionC++ CODINGTHE FILES NAMES ARE GIVEN BELOW:The Ticket Module (implementation provided)The Ticket class encapsulates a Ticket to be given to the patients when they arrive. Read the code, understand it, and use the logic and the functionalities throughout the project.#ifndef SDDS_TICKET_H_#define SDDS_TICKET_H_#include “Time.h”#include “IOAble.h”namespace sdds { class Ticket:public IOAble{Time m_time; int m_number; public:Ticket(int number);operator Time()const;int number()const;void resetTime();std::ostream& csvWrite(std::ostream& ostr)const;std::istream& csvRead(std::istream& istr);std::ostream& write(std::ostream& ostr )const;std::istream& read(std::istream& istr); };}#endif // !SDDS_TICKET_H_Member VariablesTime m_time;The time the Ticket was issuedint m_Number;The ticket number; A sequential integer, starting from one and unique for each lineup.Member functions and constructorTicket(int number);Constructs a Ticket by setting the?_number?ember variableoperator Time()const;When Ticket is casted to?ime?t will return the?_timeint number()const;A query returning the number of the ticketvoid resetTime();Sets the Ticket time to the current time.Virtual function overridescsvWriteInserts comma-separated ticket number and time into ostream.csvReadExtracts the ticket number and time in a comma-separated format from istream.writeInserts a ticket into the ostream to be displayed on the console.readExtracts the ticket information from istream. This function works the same as csvRead.The Patient ModuleCreatean abstract IOAble patient class (the patient class is a derived class from IOAble). The patient class is responsible to encapsulate a general patient arriving at the hospital. In later designs (MS4) the patient class will be inherited into a COVID test patient and a triage patient.The following are the mandatory properties of the patient class.Member Variables and Objectsthe patient nameA character pointer variable to hold the name of the patient in a Cstring dynamically.the OHIP numberAn integer to hold the OHIP insurance number (exactly 9 digits) of the patient.the ticketA?icket?bject to hold the ticket of the patient for the lineup.the file IO flagA Boolean flag. This flag will be set to?rue?f the patient object is to be written into or read from a?ile?comma separated value), otherwise, this flag will be set to?alse?f the patient object is to be written on or read from the?onsole.Constructor and destructorA patient can be instantiated using a ticket number (an integer) and a file IO flag (a Boolean). The ticket number is used to initialize the member?icket object. The file IO is used to initialize the member?ile IO flag.When a patient has instantiated it, If the file IO flag is not provided the default value?false””?s passed also if the ticket number is not provided the default value?ero (0)?s passed.Copying and assignment.A patient cannot be copied or assigned to another patient;DestructorThe destructor of the patient will deallocate the dynamically allocated?atient name Cstring.Member functionsPure Virtual Function type()Createa pure virtual function called?ype?hat returns a character and is incapable of modifying the current object. In future derived objects

Get a plagiarism-free order today   we guarantee confidentiality and a professional paper and we will meet the deadline.    

Leave a Reply

Order a plagiarism free paper today. Get 20% off your first order!