You will be building upon what you have made for an event planning system to cre

Published by John M. Re

Nov 29, 2021

s

Struggling with a similar assignment? Don’t know where to start? Don’t have time to work on this? Get a high-quality paper written for you from scratch – PLAGIARISM FREE, guaranteed to get you a good grade. To get started, please click on the Submit Your Instructions at the bottom of the page.

You will be building upon what you have made for an event planning system to create a Schedule class. You will be using the Time and Date classes while the Event class will now be used as an abstract class with derived classes Birthday and Concert. You will finish implementing the Schedule, Event, Birthday, and Concert classes.
Event Class
To make the Event class an abstract base class, you will declare some pure virtual functions. It is up to you to figure out what should and should not be a virtual function. Event will also need a virtual destructor. Hint: To figure out if a function should be virtual, think about derived classes using the function and if what they do should differ from each other based on what derived class they are called from.
All protected data members have their own get and set functions.
This class will also have one more protected string called type which specifies what type the derived class object is.
Birthday Class
This class is a derived class of the Event class. It has the private data member
string gifts
Constructor: The constructor for the Birthday class will take three strings, a time, and a date as input. The first is the description, the second is the location, third is time, fourth is date. and the fifth are the gifts.
Assigns type to be “birthday”.
The constructor has been provided for you.
printSummary: This function overrides Event’s printSummary function.The function will output to standard output with cout. There will be five lines that will be output:
The description
The location
The time
The date
The gifts
Karl’s birthday
Bounce house
Time: 13:30:0
Date: 14/3/2020
Gifts: bike, pillow
The end of the function should output an endl.
Concert Class
This class is a derived class of the Event class.
It has the private data member
int tickets
Constructor: The constructor for the Concert class will take two strings, a time, a date, and the number of tickets as input. The first is the description, the second is the location, third is time, fourth is date. and the fifth are the number of tickets.
Assigns type to be “concert”.
The constructor has been provided for you.
printSummary: This function overrides Event’s printSummary function. The function will output to standard output with cout. There will be five lines that will be output:
The description
The location
The time
The date
The number of tickets
Houston Symphony
Jones Hall Houston, TX
Time: 20:0:0
Date: 6/11/2021
Tickets: 2
The end of the function should output an endl.
Schedule Class
This class will be handling multiple events for us.
The data members the Schedule class has are:
int size
int numBd
int numC
Event* events[MAXNUMEVENTS]
Time time
Date date
The time and date represent today’s time and date in the schedule.
Constructor: Schedule’s constructor takes in a int for the number of events the Schedule object will have and a time and date for today.
Schedule(int numEvents, Time t, Date d);
The size data member is assigned numEvents. The events data member has its elements assigned to be nullptr.
setEvents: This function takes in an int variable s and an Event* const array named newEvents.
Assign s to size. Copy the elements from newEvents to our events array.
Each element of the events array must be assigned new addresses before copying the newEvents element’s events. You should check what other’s event element type is to properly assign a new address for either Birthday or Concert. Since the newEvents array is an Event* const array, you must cast the dereferenced element into either a Birthday or Concert reference when copying from newEvents’ array.
Destructor The destructor must free up the memory that the pointers have used.
Hint: You must loop through the events array and delete each element as each element is a pointer. Make sure they are not nullptr before deleting.
Copy Constructor: you must do a memberwise copy of of size, numBd, numC, time, and date. Finally, you may use the setEvents function to initialize the events array.
Copy Assignment Operator: similar to the copy constructor, make sure to assign events based on their type.
eventsFromInput: this function is provided for you. This function is what will be getting the event information from standard input. They are not ordered by time or date.
There will be 10 lines of information for each event.
The first will be the type of event. (Birthday or Concert)
The description
The location
The hours
The minutes
The seconds
The day
The month
The year
Either a string that are gifts for the Birthday class, or the number of tickets for the Concert class. When you get a birthday event, increment numBd. When you get a concert event, increment numC.
Example input:
birthday
Karl’s birthday
Bounce house
13
30
0
14
3
2020
bike, pillow
getFirstEventDate: this function returns the Date of the event that is the earliest in the Schedule object’s events array. You will have to compare the dates and time in the events array to do this. This function is given to you.
Date getFirstEventDate();
getLastEventDate: this function returns the Date of the event that is the latest in the Schedule object’s events array. You will have to compare the dates and time in the events array to do this. You can base this function off of what was done for the getFirstEventDate function.
Date getLastEventDate();
eventsPassed: this function returns the number of events that have already passed in the schedule. You will need to compare the events in the events array with the Schedule object’s time and date member variables which represent todays date and time.
printSummary: this function gives a brief overview of what is in the schedule and then outputs the events in the order given from input.
The output is formatted like:
“Today is ” [date] ” ” [time]
[first event’s date] “—” [last event’s date]
[events passed] ” events have passed.”
endl
printSummary of each event (birthday or concert) in the schedule.
Today is 2/2/2021 1:1:1
29/1/2021—14/3/2022
1 events have passed.
John’s birthday
Park
Time: 12:30:30
Date: 29/1/2021
Gifts: kite, bike
Kyogo
Minute Maid Park – Houston, Tx
Time: 18:30:0
Date: 13/11/2021
Tickets: 3

main.cpp
This has been provided for you. The first 7 lines from input will give:
The number of events
The hours
The minutes
The seconds
The day
The month
The year These allow us to make a Schedule obj in main. After the object is made, it must use the eventsFromInput function to get the events from standard input. Then if should call the printSummary function.

n

Need Writing Help? Our writing specialists are here 24/7, every day of the year, ready to support you! Instantly chat with an online tutor below or click here to submit your paper instructions to the writing team.

[jetpack-related-posts]

More than just an assignment.

GET THE GRADES YOU DESERVE | A OR A- GUARANTEED
NO MORE SLEEPLESS NIGHTS DOING RESEARCH
NO MORE LATE POINTS DEDUCTIONS 
GET A QUALITY PAPER SENT TO YOUR EMAIL
GET GOOD GRADES ON YOUR ASSIGNMENTS
Explore Now →

Who is this homework service for?

* If you are having a really hard class and want to get through it, then this is for you.

* If you have a medical emergency or someone close to you has a medical emergency and you don’t think you’ll be able to turn your assignment on time, this is definitely a service you could use.

* You can use us if you are having a tough Professor who won’t give you the grades you deserve.

* If you have a tight work schedule and you are getting points deducted for not submitting assignments on time.

* English might not be your first language and you feel like you are being left behind in class because of it.

* If you have a large project coming up and don’t think you have enough time to get it done well, definitely reach out to us.

TALK TO SUPPORT
{

Super stoked you are checking us out! We would like to help you with your assignment. We just need a few things from you:

* The full assignment instructions as they appear on your school account.

* If a Rubric is present, make sure to attach it.

* Any relevant weekly readings or learning resources.

* Include any special announcements or emails you might have gotten from your Professor regarding your assignment.

* Any templates or additional files required to complete the assignment.

If your assignment is somewhat complex and you need to explain it, please don’t hesitate to reach out to me via live chat. 

 

FAQ

Frequently asked questions

How soon can I get my paper done?

It depends with your deadline. If you need your paper completed in 3 hours, we will deliver it in that time. All you need to do is indicate your deadline in our custom order page here. Alternatively, if you are sending us your instructions via email, please be sure to indicate your deadline.

Will it be completely original? I don't want to be caught in a case of Academic Integrity Violation.

We are as paranoid as you are. Maybe even more! And we understand that the greatest sin you can commit in your academic journey is plagiarizing your academic work. To that end, we have made sure that we check and double-check our papers using high quality plagiarism detection tools such as SafeAssign and Turnitin before submitting the paper to you.

Who is my writer? Is he/she a native English Speaker?

All our writers are native English Speakers. That is not to say that ESL writers are not good, we just prefer hiring native writers because we want the very best people working on your paper. This might mean paying a little bit more for your paper as opposed to when you pay a foreign company whose writers are non-native English Speakers.

What if I need revisions? Will your charge additional for this?

Of course not! If you do happen to require a revision on your paper, our team will handle it for you free of charge. Matter of fact, we won’t rest till you are happy with your paper. So, ask for as many revisions as you need, it’s completely FREE!

Will you give me my money back if I don't like my paper?

We have very few instances where we delivered a paper that a client didn’t fall in love with. But if it so happens that you don’t like your paper for any reason whatsoever, we’ll refund your money back no questions asked.

I have more assignments after this, can you help me with those too?

Of course! And what’s even better is that we can reserve a writer permanently to work on your entire class. This comes in handy for projects which build up on each other and where you need just one writer, one writing style.

I got my order information wrong, can I change that?

Yes you can. Just reach out to our support team via email (support@essaynook.com) or live chat here and they’ll help you change the instructions.

Can I place an order via email instead of going through the order page?

Yes you can. Email Anna at anna@essaynook.com, she’s in charge of our sales team. Alternatively, you can talk to our Live Chat team here and request to speak to Anna.

Trusted by Thousands of Students

Delivering quality assignments since 2007