It’s time to create our first use case, so where to start? Well it seems clear to me that a top down approach is needed here, after all you can’t book tee times on a course that doesn’t exist and you can’t book tee times on a course when you don’t know when it opens, right? So our first use case has to be for the administration system and has to be around the maintenance (create, read, update and delete functions) of our course diaries. The use case follows below. You will notice that I don’t favour the fully dressed style of use case for this project as I think it is “too much” for blog posting. Readers who wish to find out more about use cases should read the excellent book Writing Effective Use Cases by Alistair Cockburn (Wikipedia). Readers may also wish to read about (the more fashionable) user stories.
Now I know this is going to upset the architectural fundamentalists, but I’m going to roll up related functionality into a single use case. I’m doing this for purely aesthetic reasons, to enable me to adhere to the four post policy that I described earlier. Just to keep us on the straight and narrow though, it is worth pointing out to our less experienced readers that, under normal conditions, each use case would deal with only one… well, use case :-)
As an aside, for those of you who are unfamiliar with the business area (and I’m assuming that’s the majority) the course diary describes what day of the year the course opens and closes and the first and last tee times, as well as any “outages” (for competitions etc). This is because it takes time (say 5 hours) to complete a round of golf and the times at which you tee off, and thus the time you are expected to return to the club house, are set up so that you are playing in day light during both winter and summer. Okay, so let’s get on with it.
Use Case: 001 Maintain Golf Course Diaries
Primary Actor
Administrator
Priority
High
Frequency
2/year
Trigger
Course diary maintenance required
Main Success Scenario
1. Administrator logs on to the system
2. Administrator elects to create a new course diary
3. Administrator creates a new course diary
Extensions
2.1.1 Administrator elects to edit a course diary
2.1.2 Administrator selects a course diary
2.1.3 Administrator edits a course diary
2.1.4 Course diary is edited if it does not invalidate future tee time bookings
2.2.1 Administrator elects to delete a course diary
2.2.2 Administrator selects a course diary
2.2.3 Administrator deletes a course diary
2.2.4 Course diary is deleted if it is not in use
2.3.1 Administrator elects to create an outage
2.3.2 Administrator creates an outage
2.3.3 Outage is create if it does not invalidate future tee time bookings
2.4.1 Administrator elects to edit an outage
2.4.2 Administrator selects an outage
2.4.3 Administrator edits an outage
2.4.4 Outage is edited if it does not invalidate future tee time bookings
2.5.1 Administrator elects to delete an outage
2.5.2 Administrator selects an outage
2.5.3 Administrator deletes an outage
2.5.4 Outage is deleted