Menu
support@authoritypapers.com
+1(805) 568 7317

need help with this java program im having a problem have all the output come out wr 5188633

Need Help With this Java program, Im having a problem have all the output come out write, where in bold below in sample, i need to get that exact output, please help with this java program.

Develop a tool to keep track of events – a basic electronic planner of sorts. The Planner will be able to add events, delete events and view events either for a specific date or for seven days starting at a specific date. The planner is able to calculate how many days exist between events. An Event will be stored in an array (set maximum size for now to be 10). There can only be one Event for a given date. Sorting, deleting and retrieving elements (in this case, the elements are references to Event objects) efficiently in an array will be a major topic in your third semester Data Structures course; for now, events will be stored in an array and do not need to be sorted. This means we will just search sequentially through the array. Every Event will contain a date (day, month, year) and an activity description (String). All input entered from the keyboard must be fully edited for valid data. In the case of this assignment, if a user attempts to enter data that is outside of the appropriate range, by default the field will be set to the first day, month or year of the acceptable range of values. For example if a user attempts to set a day to 34, it will automatically be set to 1. NOTE: Only Planner interacts with the user, no other classes should use Scanner or println (etc.)

• Assign1 contains only a main method, which instantiates one Planner and calls runMenu().

• Planner has a private int constant which is used for the maximum amount of events, an array for Event references (10 references), an int and an OurDate reference, one constructor and six methods:

§ runMenu() – shows the menu, interacts with the user for menu selection, loops till they exit.

§ addEvent().

§ verifies that the maximum number of events is already in the Planner

§ loops through the array to confirm that an event for the date specified is not already taken.

§ If there is not already an event on the date specified, add the event to the array and add one to the numEvents counter.

§ enterDate() – fetches the date from the user and assigns values to the fields of each reference by invoking methods of the OurDate class.

§ displayOneDay() – displays the event for the date specified.

§ displaySevenDays() – displays seven days of events by invoking displayOneDay() seven times, starting with the event with the date specified.

§ deleteEvent()

§ loops through the events array, searching for event by the date.

§ If the event is found, delete it and move all the event references up one, so as not to leave a null element in the middle of the array. Remove one element from the numEvents counter.

• Event has an OurDate reference, a String reference, three constructors and six methods:

§ Two overloaded setDate() methods.

§ setDescription().

§ getDate().

§ getDescription().

§ toString() – returns a String representation of the Event reference.

• OurDate has three fields, day, month and year, three constructors, and eleven methods:

§ setDay(), setMonth(), setYear(), each must verify that the day, month or year respectively is valid.

§ getDay(), getMonth(), getYear(), returns day, month or year, respectively.

§ isEqual() – compares two dates to see if they are equal..

§ toString() – returns a String representation of the OurDate reference.

§ addOne() – adds one day to the current date, checks for boundaries such as last day month, year, etc..

§ isLeapYear() – determines if the year specified is a leap year or not – you may use an existing algorithm (found online ?) for this, BUT…be certain to reference the source in a comment.

§ calculateDays() – calculates the amount of days from a base year (in this case January 1, 2000) to the date specified. Invokes the isLeapYear() method.

Sample Program Run (user inputs are bold and highlighted):

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 1

Enter event description: rock concert

Enter event date: Enter year: 2015

Enter month: 3

Enter day: 4

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 1

Enter event description: work

Enter event date:

Enter year: 2015

Enter month: 3

Enter day: 3

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 1

Enter event description: dinner at folks

Enter event date:

Enter year: 2015

Enter month: 3

Enter day: 5

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 1

Enter event description: movie night

Enter event date:

Enter year: 2015

Enter month: 3

Enter day: 4

You already have an activity for that date and time…cannot be entered

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 2

Enter date to display:

Enter year: 2015

Enter month: 3

Enter day: 5

Your events for 2015/3/5 are:

2015/3/5 – dinner at folks

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 3

Enter starting date to display:

Enter year: 2015

Enter month: 3

Enter day: 1

Your events for the week starting 2015/3/1 are:

Your events for 2015/3/1 are:

Your events for 2015/3/2 are:

Your events for 2015/3/3 are:

2015/3/3 – work

Your events for 2015/3/4 are:

2015/3/4 – rock concert

Your events for 2015/3/5 are:

2015/3/5 – dinner at folks

Your events for 2015/3/6 are:

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 4

Enter date to delete event from:

Enter year: 2015

Enter month: 3

Enter day: 4

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 3

Enter starting date to display:

Enter year: 2015

Enter month: 3

Enter day: 1

Your events for the week starting 2015/3/1 are:

Your events for 2015/3/1 are:

Your events for 2015/3/2 are:

Your events for 2015/3/3 are:

            2015/3/3 – work

Your events for 2015/3/4 are:

Your events for 2015/3/5 are:

2015/3/5 – dinner at folks

Your events for 2015/3/6 are:

Make a selection:

1. Add event to planner

2. Display event for a day

3. Display events for a week

4. Delete an event

0 to quit: 0

Goodbye

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now