Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a Java Program that uses a hash map to store events. The event name will be the key for the Hash Map and

Please write a Java Program that uses a hash map to store events. The event name will be the key for the Hash Map and the days or date and time will be the key value.

Here are the events:

CS151 Lecture TR 9:00 10:15 1/26/23 5/22/23 CS146 Lecture MW 12:00 13:15 1/25/23 5/20/23 MATH39 Lecture MW 9:00 10:15 1/25/23 5/23/23 Gym MWF 14:00 16:00 1/1/23 12/31/23 Group meetings AS 17:00 22:00 1/25/23 6/1/23 Haircut 2/24/23 15:00 16:00 Bike Ride 3/6/23 12:00 15:00 Dinner 3/24/23 18:00 20:00 House sitting 2/25/23 15:00 22:00 Warriors Game 3/2/23 19:00 23:00

Here are the event descriptions to get a better understanding.

Recurring event The first line contains the name of the event which may contain spaces. The second line consists of a sequence of day abbreviations (SMTWRFA, upper or lower case) followed by a starting date and an ending date of the recurring event.

One time event The first line contains the name of the event which may contain spaces. The second line consists of a date in the format mm/dd/yy, e.g. 3/22/22. There cannot be any spaces within a date description. The date description is followed by a starting time and an ending time. For the starting and ending times, only military 24-hour time will be used for simplicity. For example, 18:15 instead of 6:15 pm The minutes cannot be left off in which case zeros should be specified for the minutes, e.g. 14:00.

I need these events stored in a hashmap, so that when i print the current date and time if there is an event on that day it will also show up.

Thank you and please do finish it all.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

11.1 Explore the role of labor unions.

Answered: 1 week ago

Question

11.3 Discuss laws affecting collective bargaining.

Answered: 1 week ago