Question: **Please write a working program give the following requirements** The program now displays a MAIN MENU with following options: View by, Create, Go to, Event

**Please write a working program give the following requirements**

The program now displays a MAIN MENU with following options: View by, Create, Go to, Event list, Delete, and Quit. After the function of an option is done, the main menu is displayed again for the user to choose the next option.

Select one of the following main menu options: [V]iew by [C]reate, [G]o to [E]vent list [D]elete [Q]uit 

The user may enter one of the letters highlighted with a pair of the bracket to choose an option. For example,

V 

will choose the View by option.

[V]iew by The user can choose a Day or a Month view. If a Day view is chosen, the program prints today's date. If there is an event(s) scheduled on that day, display them in the order of start time of the event. With a Month view, it displays the current month and highlights day(s) with a pair of brackets {} if any event scheduled on that day. After the selected view is displayed, the calendar gives the user three options: P, N, and G, where P, N, and M stand for Previous, Next and Go back to the main menu, respectively. The previous and next options allow the user to navigate the current view back and forth. If the day view was selected, the view goes back (P) and forth (N) by day. If the month view was chosen, the view goes back (P) and forth (N) by month. Here are sample runs:

[D]ay view or [M]view ? 

If the user selects D, then today's date is displayed along with scheduled events.

Thu, August 25, 2022 CS151 Lecture : 10:30 - 11:45 [P]revious or [N]ext or [G]o back to the main menu ? <-- The option menu allows the user to choose navigating the Day view or going back to the main menu 

If the user selects M, then

 August 2022 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 {25} 26 27 28 [P]revious or [N]ext or [G]o back to main menu ? 

Help: The following example code segment shows how to print the given date in a specified format.

LocalDate c = .... DateTimeFormatter formatter = DateTimeFormatter.ofPattern("E, MMM d yyyy"); System.out.println(" " + formatter.format(c)); 

[C]reate This option allows the user to schedule an event. The calendar asks the user to enter the name, date, starting time, and ending time of an event. For simplicity, we consider one-time event only for the Create function. Your program should check if a new event is a conflict with existing events. Please stick to the following format to enter data:

Name: a string (doesn't have to be one word)

Date: MM/DD/YYYY

Starting time and ending time: 24 hour clock such as 06:00 for 6 AM and 15:30 for 3:30 PM.

[G]o to With this option, the user is asked to enter a date in the form of MM/DD/YYYY and then the calendar displays the Day view of the requested date including an event scheduled on that day in the order of starting time.

[E]vent list The user can browse scheduled events. The scheduled events are presented in two categories: One time events and Recurring events. Any canceled events will not show. The calendar displays one-time events in the order of starting date and starting time. Recurring events are presented in the order of starting date. An example presentation of events is as follows: (The format of event strings does not have to be exactly like this.)

ONE TIME EVENTS 2021 Friday March 15 13:15 - 14:00 Dentist Thursday April 25 15:00 - 16:00 Job Interview 2022 ... RECURRING EVENTS CS157C Lecture MW 10:30 11:45 8/22/22 12/6/22 CS151 Lecture TR 9:00 10:15 8/22/22 12/6/22 

[D]elete The user can delete an event from the Calendar. There are three different ways to delete an event: Selected, All and DeleteRecurring. Other types of deletion will not be considered for simplicity.

[S]elected: the user specifies the date and name of an ONE TIME event. The specific one time event will be deleted.

[A]ll: the user specifies a date and then all ONE TIME events scheduled on the date will be deleted.

[DR]: the user specifies the name of a RECURRING event. The specified recurring event will be deleted. This will delete the recurring event throughout the calendar.

[S]elected [A]ll [DR] 

Here is a scenario of [S]elected as an example. You may implement [A]ll and [DR] according to the above description. If the user enters S, then the calendar asks for the date and displays all the events scheduled on that date. The program then asks the name of the event to be deleted and deletes the specified event. If there is no such event, the program promotes an error message.

Enter the date [dd/mm/yyyy] 09/15/2022 13:15 - 14:00 Dentist 17:00 - 17:45 Piano Lesson Enter the name of the event to delete: Dentist 

[Q]uit The program prompts "Good Bye", saves the current events in a file called output.txt, and terminates. The main menu will be displayed after each option is done. It is crucial to have a user friendly interface for the user to enter input. For example, if the calendar needs a date from the user, suggest a specific format of the date for the user to use.

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!