Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1- Write a java class called Event.java representing an event set up in someones calendar. This class should store three bits of information about the

1- Write a java class called Event.java representing an event set up in someones calendar. This class should store three bits of information about the event:

What is the title of the event (a String)

Where is the event going to take place (a String)

What is the date the event is going to take place (a GregorianCalendar)

How many hours long is the event (a Double) The Event class should have eight methods

setTitle(String title) for setting and storing the title of the event

String getTitle() for returning the title of the event

setVenue(String venue) for setting and storing the venue of the event

String getVenue() for returning the venue of the event

setDate(GregorianCalendar date) for setting and storing the date of the event

String getDate() for returning the date of the event in MM/dd/yyyy

setDuration(double duration) for setting and storing the duration in hours of the event

double getDuration() for returning the length of the event in hours

2. Write a java application called EventTest.java that lets the user create two Event objects and then prints the following sample output.

Enter title of the first event: New Student Welcome

Enter venue of the first event: Student Union Building

Enter the date of the first event (MM/dd/yyyy): 02/22/2017 2 CS2365 Project 1

Enter duration for first event: 2.5

Enter title of the second event: Job Fair

Enter venue of the second event: University Career Center

Enter the date of the second event (MM/dd/yyyy): 02/15/2017

Enter duration for second event: 6

Output: Student Orientation event will take place on 02/22/2017 for 2.5 hours in Student Union Building

Job Fair event will take place on 07/26/2017 for 6 hours in University Career Center.

Project 1-part 2 Rewrite your code and create a class date and use it (instead of using a GregorianCalendar), and test it again.

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

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

5. Tell how job experiences can be used for skill development.

Answered: 1 week ago

Question

4. Explain the characteristics of successful mentoring programs.

Answered: 1 week ago