Вы находитесь на странице: 1из 1

CSE 271 Spring 2015

2-27-2015

due: 11:59PM 3-15-2015

Project 1 100 points


For this project we will be constructing an appointment book in an incremental fashion. It will be drawing on everything
we have learned in the course thus far. You have some flexibility here in how you design this, so if you make any
assumptions about the requirements, be sure to state them in your comments. This project is more independent than the
Labs/Assignments. So, while the TAs and I can help you with concepts, we wont help you design or code your projects.

Part 1 (45 points)


Create an AppointmentBook class that stores a collection of Appointments.
Implement a superclass Appointment and subclasses Onetime, Daily, and Monthly. An
appointment has a description (for example, see the dentist) and a date. A Onetime appointment
occurs only once, Daily occurs every day, and Monthly occurs once a month. Write a
method occursOn(int year, int month, int day) that checks (returns) whether the
appointment occurs on that date. For example, for a monthly appointment, you must check
whether the day of the month matches with the specified day, that is, checking that monthly
appointment, X, occurs on the 15th day of the month. Subsequently, in a tester, fill an
AppointmentBooks collection of Appointment objects with a mixture of appointments. Have the
user then enter a date and print out all appointments that occur on that date.

Part 2 (25 points)


Improve the appointment book class. Make a method that allows adding new appointments. The
method parameters must include the type of the appointment, the description, and the date.

Part 3 (30 points)


Improve the appointment book program by having a
file and a separate method to reload the data from a
a method save. Save the type, description, and date
determine the type of the appointment to be loaded,
a load method to load the data.

method that saves the appointment data to a


file. The saving part is straightforward: Make
to a file. The loading part is not so easy. First
create an object of that type, and then call

Bonus (10 points)


Create a Graphical User Interface (GUI) for your appointment book that displays appointments,
allows appointment creation, and loading and saving files. If you need help or review on GUIs,
read Chapter 10 in the text book. Points here will be given based on how many features and how
well laid out your GUI is. It is bonus because you will likely have to read ahead and learn some
skills on your own. So, do not feel pressured to do it, but it will help you with future material to
come.

Submission
Turn in a .zip file or all your .java files to Niihka by 11:59pm on Sunday March 15th. Grading will be based on conforming to
the standards we reviewed in class as well as following the requirements of this project.

Вам также может понравиться