doubly linkedlist
In this project, you will develop code for a scheduling application. Speciï¬cally, you will need to implement two classes, Scheduler and ScheduleNode. Scheduler is the “main†class, and it maintains the schedule as a doubly-linked collection of ScheduleNodes. Each ScheduleNode has a name and duration and represents a single event on the schedule. A header for both classes has been provided, and you are not allowed to modify this ï¬le.
The program starts with an empty schedule of length 100, to which the user may add (and later cancel) events. As user adds and removes events to the schedule, there are ï¬ve main challenges your code should overcome:
2 Member function descriptions
The member functions you will need to implement are as follows:
1
TIME: NAME (DURATION) where TIME represents the start time of the event, NAME the event’s name, and DURATION the length of the event. Note that there are two spaces after the colon and one before the open parenthesis. • Scheduler::~Scheduler(): destroys the Scheduler, freeing all ScheduleNodes. You are not required to implement a copy constructor or copy assignment operator for the Scheduler. • void ScheduleNode::merge(ScheduleNode* other): (Optional) compares this ScheduleNode to its argument (which should be the next or previous node), and combines the two nodes into one with the same name where the length is the sum of the two original nodes. This function is not called by the driver and is totally optional, but you may ï¬nd it helpful to implement this so that you can use it in other functions.