Scenario
Calendar
add(Date,Time,Time,String,int):
REGULAR:int
TODO:int
ALLDAY:int
date
start
end
desc
type
Date
Time
Time
String
int
*
*
*
*
*
We start with a class that keeps a calendar of appointments.
The information for each appointment is kept in fields of arrays (one for the date, one for the start time, etc.)
Appointments can be made in three types: regular, to-dos, and and all-day (indicated by a numeric type code).
The programmer would like to refactor this to create an extensible abstraction for an Appointment.