Need help with Java BlueJ code. I need it to be as simple as possible! Very beginner. Thank you and will rate if helped.
A DailyEvent object has the following fields:
- title: a String that describes the event.
- startTime: an int between 9 and 20 inclusive (the working hours of the venue).
- endTime: an int between 10 and 21 inclusive (the working hours of the venue).
It should have:
- A no-arg constructor that sets the title to "No event scheduled today" and all other numeric fields to 0.
- An arg-constructor that accepts a String title, int startTime, int endTime, and int guestNumber.
- A copy method.
- A toString method that should return a String that describes the event as follows: "title, from event's starting time to event's end time, Guests: event's number of attendees."
BIC
Monday would be 1, Tuesday would be 2, and so forth.
The second field is a DailyEvent type named "event" which will reference an object of type DailyEvent that you defined before. In addition, provide the following methods:
- A no-arg constructor that sets the dayNumber field to 1 and event to an unpopulated (empty) event.
- A constructor that accepts the dayNumber of the day and a DailyEvent object as parameters. It should set the event to the DailyEvent object passed.
- The int argument.
A getDayName method that returns the name of the Day. For example, if the dayNumber field contains 1, then this method should return "Monday".
Example 1: Monday, Alice's Graduation Party from 18 to 21, Guests: 24
Example 2: Wednesday, No event scheduled today
A greaterThan method that compares the dayNumber field with another day's dayNumber field. If the dayNumber field is greater than the other day's dayNumber field, this method should return true. Otherwise, it should return false.