CSE2305 - Object-Oriented Software Engineering
assessment

 

UML Sample Question


This question is from the 2003 Exam
Total marks: 25.
(Spend 25 minutes on this question)

(D.1) Using UML notation, draw a class diagram suitable for a system implementing the database below. Make sure you include all relevant class attributes and behaviours.

You have been asked to design components of a new personal organizer system. The system is fundamentally a database that stores events such as appointments, birthdays, contact details, to-dos, reminders, etc. All events should be able to store some lines of text associated with the event. For example the text of a reminder event might be “reminder: Sampson has borrowed my scissors”. All events remember their creation date and time.

There are two main categories of event that the system needs to be able to store: date-based and floating. Date-based events are based around the event occurring at a particular date and time, such as a meeting or lecture. Floating events do not have a specific date and time and are always current. They include things like to-do lists, reminders and contacts.

Date-based events can be further classified into two types: single and recurring. Single date-based events occur once at a particular date and time for a specified duration. Recurring events occur at a particular date and time for a specified period also, but they recur at regular intervals (every day, on a particular day of the week, on a particular day of the month, on a particular day of the year). Recurring events would include things like birthdays, lectures. They recur a specified number of times from the date of the first event.


The organizer system also incorporates the concept of categories — user defined names used to categorize events, allowing the organizer to select events based on their categories. Categories might include things like “work”, “home”, “study”, “friends” — the choice is up to the user of the system. Each event must be a member of at least one category, with membership of up to five categories permitted (a special category “default” is assigned by the system if the user does not specify membership of any others).

The organizer needs the following functionality:

• the ability to load and save the database to disk
• the ability to add, delete and edit events
• the ability to sort events by creation date
• the ability to sort date-based events by start date
• the ability to find events of a particular category
• the ability to find events of a particular type
• the ability to find events for the current day, week, month and year.


You do not need to include pseudo-classes representing any setup code at all — assume someone else’s code will be responsible for setting up your objects at run time.


Here is a sample answer. (pdf file).


This material is part of the CSE2305 - Object-Oriented Software Engineering course.
Copyright © Jon McCormack, 2005. All rights reserved.

Last Modified: October 1, 2005