Hello i need help with an assignment i have to do. using five classes, i have to create a planner that uses an array and can store an "activity" for a specific date and time. here's two classes done already:
OurDate
OurTime
The three other classes are as follows (and what they need to contain):
Event class:
Data fields:
date: OurDate - the day/month/year of the event
time: OurTime - the hour/minute that event starts at
description: String - a description of event
Methods:
default constructor
initial constructors
getDate () : OurDate - returns date of event
getTime() : OurTime - returns time of event
getDescription () : String - returns description of event
setDate (OurDate) - sets date to parameter value
setTime (OurTime) - sets time to parameter value
setDescription (String) - sets description to parameter value
toString() : String - displays event to a String
inputFromKeyboard () - prompts input from keyboard for all
data fields
Planner class:
Data fields:
activities : Event[] - array of Event
numEvents : int - how many events are stored in the activities
array
Methods:
default constructor
inputActivity () - adds an Event to the activities array if there
is room and if there is no other activity for that date and time
displayOneDay(OurDate) - looks through array and displays
all events for the parameter date
displaySevenDays (OurDate) - displays events for the seven
days starting at parameter date
deleteEvent (OurDate, OurTime) - looks through array for an
event at parameter date and time, and deletes it (if found)
and finally Assignment class, which only has method main and loops everything. note i cant use any librarys and stuff because we havent done anything with them yet.
i cant figure this out for the life of my. what goes in the setDate getDate setTime getTime fields? how do i tell teh array to check if a date and time is already entered?
help is greatly, greatly appreciated.