Question: In this project you will complete the implementation of a Java program that provides a user with an event scheduler. This is a simple ordered

In this project you will complete the implementation of a Java program that provides a user with an event scheduler. This is a simple ordered list of events that the user wants to keep track of. Many people use various methods of keeping track of simple events including sticky notes, whiteboards, writing on your hand, etc.

/* This class encapsulates a list of user events, where an event * is represented by a String object. */

public class EventSchedule { //Class member variable declarations: /* Constructor that initializes the event list and any other * variables. */

public EventSchedule(){ } /* Add the event passed in to the end of the list. * For example, if the list contained: event1, event2, * the next event added, event3, would result in this list: * event1, event2, event3. */

public void addEvent(String eventStr){ } /* Overwrite the event at "position" to be the parameter "eventStr". * Note: position is a positive integer > 0 that has to be a valid position * in the eventList. A valid position corresponds to an event stored in the * eventList. For example, if this was the list: 1 walk the cat 2 order doughnuts 3 go to the gym 4 wash dishes * valid positions would be 1, 2, 3, 4. All other integers are invalid. * This method returns true if a valid position was passed in, false otherwise. */

public boolean replaceEventAt(String eventStr, int position){ return false; } /* Remove the last event in the eventList. * For example, if the list contained: event1, event2, event3, * removing the last event would result in this list: * event1, event2. * This method returns true if there is at least one event in the list, * false otherwise. */

public boolean removeLastEvent(){ return false; } /* Return the event list as an array of Strings. * Note that the array should contain only the events * on the list in the correct order (index 0 is position 1) * and no empty cells (null values). */

public String[] getEventListAsArray(){ return null; } /* Remove all events from the list, resulting in an empty list. */

public void clearEventList(){ } /* Returns a String representation of the current event list according to * these specifications: * Each event is on one line, position number first followed by one blank, * followed by the event String. * For example: 1 walk the cat 2 order doughnuts 3 go to the gym 4 wash dishes * If no events are on the list the String returned is: "no events". */

public String getEventStr(){ return null; } /* Returns the number of events stored in the event list. */

public int getSize(){ return 0; } /* Returns true if the event list contains no events, false otherwise. */

public boolean isEmpty(){ return false; } }

There is a file about my homework, if you do know how to solve this problem, please comment me. Maybe I can send you the whole file to your email.

Really appreciate! Thanks!!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!