(Solved) : Going Try Build Application Keeps Track Calendar Assuming Classes Structs Follows Struct P Q37220599 . . .


We are going to try to build an application that keeps track of my calendar. Assuming that I have some classes and structs as follows: struct Person [ string fname, lname; struct Date int year, month, day; class Event private: Person tendee; // dynamic array of people for the event int numattendees; I/ number of attendees Date date; // date of event int start h。ur, end hour: // start time , end time。f event public: Event Event (Date, int, int); // create event at Date with start time and end time Event ) bool setDate (Date); bool setTime (int, int); int addAttendee (Person); // add Person to event // return number of attendees int removeAttendee (Person) // remove Person from event, // return number of attendees int compareEvent (Event *); // compare events int mergeEvent (Event *); // merge Event to calling Event, // i.e. merge the attendees ostream &print (ostream&); I currently have my events in a file as shown: Murderer Sam 2018 5 7 16 23 Mosley Tammy 2019 6 25 17 Ventnor Alfie 2017 7 10 15 17 Lampwick Tillie 2019 10 12 17 24 Croydon Thelma 201767618 Stone Penny 2019 6 25 17 Ventnor Alfie 2017 7 10 15 17 Bottomley Jillian 2018 4 2 11 23 First some support functions for the Event class 1. (10pts) Write the compareEvent method to compare two Events and return -1 eventl is before event2 a. 0: eventl is at the same time or overlaps event2 1: eventl is after event2 (10pts) Write the code for the addAttendee method, expanding the array as needed and keeping in mind that an attendee should only be listed once (10pts) write the code for the megeEvents method assuming that you can only merge events that occur at the same time. b. c. Linked-List Implementation. In this implementation, I want to use a linked-list to keep track of the events in my calendar. Of course, it must be kept in chronological order. 2. (10pts) Write the code to declare the ELNode and EList needed to create a single-link linked list of events. You should have methods to add and delete events. (10pts) write the code for the addEvent(Event sorted in chronological order, and events should not overlap. If they do overlap, they are merged. a. b. method assuming that the list must remain c. (10pts) Write the code for the deleteEvent(Event “method assuming you can delete from anywhere in the list. Note you delete if the Event matches the Date and time (Extra 5pts) Explain how you would go about merging two ELists. d. Show transcribed image text We are going to try to build an application that keeps track of my calendar. Assuming that I have some classes and structs as follows: struct Person [ string fname, lname; struct Date int year, month, day; class Event private: Person tendee; // dynamic array of people for the event int numattendees; I/ number of attendees Date date; // date of event int start h。ur, end hour: // start time , end time。f event public: Event Event (Date, int, int); // create event at Date with start time and end time Event ) bool setDate (Date); bool setTime (int, int); int addAttendee (Person); // add Person to event // return number of attendees int removeAttendee (Person) // remove Person from event, // return number of attendees int compareEvent (Event *); // compare events int mergeEvent (Event *); // merge Event to calling Event, // i.e. merge the attendees ostream &print (ostream&); I currently have my events in a file as shown: Murderer Sam 2018 5 7 16 23 Mosley Tammy 2019 6 25 17 Ventnor Alfie 2017 7 10 15 17 Lampwick Tillie 2019 10 12 17 24 Croydon Thelma 201767618 Stone Penny 2019 6 25 17 Ventnor Alfie 2017 7 10 15 17 Bottomley Jillian 2018 4 2 11 23
First some support functions for the Event class 1. (10pts) Write the compareEvent method to compare two Events and return -1 eventl is before event2 a. 0: eventl is at the same time or overlaps event2 1: eventl is after event2 (10pts) Write the code for the addAttendee method, expanding the array as needed and keeping in mind that an attendee should only be listed once (10pts) write the code for the megeEvents method assuming that you can only merge events that occur at the same time. b. c. Linked-List Implementation. In this implementation, I want to use a linked-list to keep track of the events in my calendar. Of course, it must be kept in chronological order. 2. (10pts) Write the code to declare the ELNode and EList needed to create a single-link linked list of events. You should have methods to add and delete events. (10pts) write the code for the addEvent(Event sorted in chronological order, and events should not overlap. If they do overlap, they are merged. a. b. method assuming that the list must remain c. (10pts) Write the code for the deleteEvent(Event “method assuming you can delete from anywhere in the list. Note you delete if the Event matches the Date and time (Extra 5pts) Explain how you would go about merging two ELists. d.
Expert Answer
Answer to We are going to try to build an application that keeps track of my calendar. Assuming that I have some classes and struc…
OR