Practical Exercise 6 using BlueJ
Note that this exercise is based on
Barnes and Koelling, Objects First, Chapter
Before starting these exercises copy (right click then save as)
projects.zip to your home directory (e.g.Z:\My Documents) and unzip it.
- Create three Appointment objects each of one-hour duration
- Use the three objects to make appointments at 9am, 1pm and 5pm
- Call showAppointments to confirm that it prints correctly
- Check that the hour cannot be double booked
- Check boundary behaviour - what happens when making appointments at 8am and 6pm?
- Create further appointments so that the day is completely full
- Check output of showAppointments is correct
- Is it possible to re-use the same appointment object at different times of the day?
- Try repeating the same tests on appointments lasting two hours instead of one hour. What errors
can you report?