Question: complete the following classes: Birthday.cpp #include Birthday.h #include Birthday::Birthday ( string de , string l , const Time &t , const Date &d ,
complete the following classes:
Birthday.cpp
#include "Birthday.h #include Birthday::Birthdaystring de string l const Time &t const Date &d string g:Eventdeltdgiftsg type "birthday"; string Birthday::getGifts const return gifts; string Birthday::getType const return type; Implement the printSummary function
Concert.cpp
#include "Concert.h #include Concert::Concertstring de string l const Time &t const Date &d int ti:Eventdeltdticketsti type "concert"; int Concert::getTickets const return tickets; string Concert::getType const return type; Implement the printSummary function
Schedule.cpp
#include "Schedule.h #include #include "Birthday.h #include "Concert.h using namespace std; Schedule::Scheduleint numEvents, Time t Date d size numEvents; numBd ; numC ; for int i;i hr m s d mt y; getlinecin blank; iftype "birthday" getlinecin unique; eventsi new Birthdaydescriptionlocation,TimehrmsDatedmtyunique; numBd; else cin tickets; getlinecin blank; eventsi new Concertdescriptionlocation,TimehrmsDatedmtytickets; numC; Time Schedule::getTime const return time; Date Schedule::getDate const return date; Date Schedule::getFirstEventDate const int index ; Event firstEvent nullptr; forint i;igetDate; else return Date; Implement the getLastEventDate function Date Schedule::getLastEventDate constImplement the eventsPassed funciton int Schedule::eventsPassed constImplement the printSummary function void Schedule::printSummary const
event.h
#ifndef EVENT #define EVENT #include #include "Time.h #include "Date.h using namespace std; Add the virtual qualifier and change member functions to pure virtual functions when needed. class Event protected: string description; string location; Time time; Date date; string type; public: Eventstring de string l const Time &t const Date &d; ~Event string getDescription const; void setDescriptionstring s; string getLocation const; Time getTime const; Date getDate const; string getType const; bool operator const Event & RHS const; bool operator const Event & RHS const; bool hasPassedDate d Time t const ; void printSummary const; ; #endif
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
