Domain Modelling
Domain Modelling
Sunday, 23 September 12
Sunday, 23 September 12
Sunday, 23 September 12
conceptual classes
Sunday, 23 September 12
Sunday, 23 September 12
conceptual classes
associations between conceptual classes
attributes of conceptual classes
Example
Sunday, 23 September 12
Sunday, 23 September 12
software artifacts
Example
Include:
Sale
date
time
Avoid:
Sunday, 23 September 12
Identifying Conceptual
Classes
Sunday, 23 September 12
product, book
intangible concepts
course, route
people
student, lecturer
places
city, classroom
events
sale, enrolment
booking policy
Noun-Phrase Identification
Sunday, 23 September 12
student
Example
1.
2.
The system retrieves the list of courses available and displays the list to the user.
3.
The system provides the user with the opportunity to select a course or to exit the use case.
4.
5.
The system retrieves the details for the chosen course, including the course outline, timetable and
eligibility requirements and displays the details to the user.
6.
The user confirms that he or she wants to enrol for the course.
7.
The system checks that the user has taken and passed the pre-requisite courses for the chosen
course.
8.
The system checks that the user is not already enrolled on a course whose timetable clashes with the
chosen course.
9.
The system records that the user is now enrolled to the chosen course, updating the list of students.
10.
The system informs the user that enrolment has been successful, and offers the student the opportunity
to receive proof of enrolment.
...
Sunday, 23 September 12
Sunday, 23 September 12
- better
Object or Attribute
If we do not think of come conceptual class X as a
number or text in the real world, X is probably a
conceptual class, not an attribute.
Craig Larman in Applying UML & Patterns (2004)
Sunday, 23 September 12
Examples
Sale
Sale
store
Flight
Airport
Store
location
Flight
Airport
name
Sunday, 23 September 12
Adding Specification or
Description Conceptual Classes
Sunday, 23 September 12
Examples
Sunday, 23 September 12
Examples
Describes-flights-to
Sunday, 23 September 12
Sunday, 23 September 12
Part 2: Associations
Sunday, 23 September 12
Associations
Sunday, 23 September 12
Example
Student
name
Course
takes
title
teaches
Lecturer
name
Sunday, 23 September 12
Multiplicity
8..*
takes
Course
0..3
title
0..3
teaches
1
Lecturer
name
Sunday, 23 September 12
Types of Multiplicity
Sunday, 23 September 12
1..*
0..3
zero to three
1..3
one to three
exactly 8
2,4,6
exactly 2, 4 or 6
Many-to-Many?
Enrolment
1
name
0..3
makes
Course
8..*
name
is upon
title
0..3
teaches
1
Lecturer
name
Sunday, 23 September 12
Identifying Associations
each Lecturer...
each Course...
Sunday, 23 September 12
Sales Rep
1..*
1..*
makes sales in
name
manages
and yes
Course
title
Area
1 title
*
*
is pre-requisite for
Sunday, 23 September 12
Generalisation
8..*
takes
Course
0..3
title
0..3
teaches
1
Person
name
Sunday, 23 September 12
Lecturer
employee #
64
Square
colour
consists of
0..3
8..*
contains
Student
name
Sunday, 23 September 12
Part 3: Attributes
Sunday, 23 September 12
Object or Attribute
(reminder)
Sunday, 23 September 12
No Foreign Keys
Student
student id
timetable
better:
Student
Timetable
student id
To conclude
Sunday, 23 September 12
Sunday, 23 September 12