Title: Objects and their Associations
1Objects and their Associations
- Studio Design in HCI
- Cheryl Geisler
- Lecture 13
2Agenda
- Schedule Adjustments
- Objects Their Associations
- Modelling Problem
- Defining Views
3Schedule Adjustments
4Lecture shifts
- Thanks!
- Last week Lecture 11/12 cancelled
- This week become Lecture 13 14
- and so on
5Assignment shifts
- This week Modelling Home and modelling
consultation cancelled - Two weeks (after break) Modelling homework and
consultations due
6Work (Phase II) Extends
- March 15 lectures
- March 21 homework (break)
- March 28 lectures
- April 5 presentations
- April 11 memos
7Work (Phase III) Contracts
- April 12 Lectures
- April 20 Paper Prototype
- April 27 Implementation Preview
- May 3 Presentations
- May 9 memos
- May 10 Final Individual Assessment
8Conceptual DesignGetting Oriented
9Deliverables
- An conceptual model of the activity transformed
by the HCI Design including - a transformed scenario
- 3-5 key views
- 3-5 key interactions,
- state tables for 3-5 principal objects
10Organization of the Deliverables
Interaction Diagrams
State Tables
Class Diagrams (Views)
Transformed Scenariao
11This Lecture Class Diagram
- v shows the objects in the HCI
- v shows the associations among them
12Next Lecture Views
- v Places them in the context of users views
13Class Diagrams
14Sample Class Diagram
dates
room type
15Hotel has rooms
dates
room type
16Guest stay in rooms
dates
room type
17Guests plan to stay in hotel through reservations
Reservation
0..
dates
plan to stay
room type
0..
Hotel
Guest
1
n
0..
Room
stay
0..
18Functions of a Class Diagram
- Conceptualized the objects the user will work
with - Places the user in the context of the new HCI
- Identifies the key actions/associations with
those objects - Represents the mediational means in the
transformed activity
19 Conceptualized the objects the user will work
with
Reservation
0..
dates
plan to stay
room type
0..
Hotel
Guest
1
n
0..
Room
stay
0..
20 Places the user in the context of the new HCI
Reservation
0..
dates
plan to stay
room type
0..
Hotel
Guest
1
n
0..
Room
stay
0..
21 Identifies the key actions/associations with
those objects
Reservation
0..
plan to stay
dates
room type
0..
Hotel
Guest
1
n
0..
Room
stay
0..
22Represents the mediational means in the
transformed activity
Reservation
0..
dates
plan to stay
room type
0..
Hotel
Guest
1
n
0..
Room
stay
0..
23This Lectures Goal
- Understand class diagrams
- Introduce tools of construction
- For further review
- http//www-3.ibm.com/ibm/easy/eou_ext.nsf/Publish/
589
24Basics of Class Diagrams
25Class Diagram of Making a Reservation
Reservation
0..
plan to stay
dates
room type
0..
Hotel
Guest
1
n
0..
Room
stay
0..
26A Word about Notation
- Unified Modeling Language (UML)
- Simplified
Room
27Basics of a Class Diagram
0..
plan to stay
0..
Hotel
Guest
28Basics of a Class Diagram
- Associations
- plan to stay
0..
plan to stay
0..
Hotel
Guest
29Basics of a Class Diagram
0..
plan to stay
0..
Hotel
Guest
30Basics of a Class Diagram
Guest
0..
Room
stay
1
31Basics of a Class Diagram
- Association Objects Reservation
- Record details of many-to-many relationships
Reservation
dates
0..
plan to stay
room type
0..
Hotel
Guest
32Association Types
331. Basic Association
Guest
0..
Room
stay
0..
342. Has a Association
- has a association
- A Hotel has n Rooms.
- Line
- Diamond
- Directional arrow
Hotel
1
n
Room
35Has a vs Basic Association
- has a
- is a special kind of
- basic association
Hotel
1..
has
0..
Room
363. Informational Association
- Showing needed state information
- Hotel has n Rooms which may be free or occupied
Hotel
1
free
occupied
n
Room
374. Subclass Association
- Showing distinct types of objects within a given
class
Room
Occupied Room
Free Room
38Subclass vs Informational
- free as information state
- vs single as subclass
Hotel
1
free
occupied
n
Room
395. Coexisting Associations
- The association stay between guest and room
Guest
0..
Room
stay
0..
Stay
40coexists with
Hotel
- the association occupied between hotel and
occupied room
1
occupied
n
Room
Room
Occupied Room
41Coexisting Association
Hotel
1
occupied
n
Room
Guest
0..
Occupied Room
0..
stay
Stay
42Identifying Associations
43Which association? The datebook schedules events
Date Book
Event
44Basic AssociationDate Book schedules Events
Event
1
0..
Date Book
schedules
45Which association? A time may be either an
available time or a scheduled time
Time
Scheduled Time
Available Time
46Subclass Association A time may be either an
available time or a scheduled time
Time
Scheduled Time
Available Time
47Which association? Appointments have times and
dates
Appointment
Date
Time
48Has a Association Appointments have times and
dates
Appointment
Date
Time
49Which association? The Date Book knows which
times are available and which are scheduled
Date Book
scheduled
available
Time
50Informational Association The Date Book knows
which times are available and which are scheduled
Date Book
scheduled
available
Time
51Which association? If the Date Book schedules
an Event, then a time is scheduled
0..
Event
schedules
1
Date Book
scheduled
Time
52Coexisting If the Date Book schedules an
Event, then a time is scheduled
0..
Event
schedules
1
Date Book
scheduled
Time
53Things to Keep in Mind
- Not right and wrong
- Depends on the model
- But better and worst
- usable and not usable
- And what I mean and not what I mean
54Building a Class Diagram
55Start with your Transformed Narrative
- A guest calls the hotel at which he or she hopes
to stay. The clerk asks for the details of the
planned stay and the desired type of room, checks
availability, and confirms the reservation.
56Underline the Concrete Objects
- A guest calls the hotel at which she plans to
stay. The clerk asks for details of the planned
stay and the desired type of room, checks
availability, and confirms the reservation.
57Underline the People
- A guest calls the hotel at which she plans to
stay. The clerk asks for details of the planned
stay and the desired type of room, checks
availability, and confirms the reservation.
58Underline the Forms/Documents
- A guest calls the hotel at which she plans to
stay. The clerk asks for details of the planned
stay and the desired type of room, checks
availability, and confirms the reservation.
59Underline the Abstract Objects
- A guest calls the hotel at which she plans to
stay. The clerk asks for details of the planned
stay and the desired type of room, checks
availability, and confirms the reservation.
60The 3-6 Key Objects
Concrete Objects
People
Abstract Objects
Forms
Hotel
Guest
Reser- vation
Details
Clerk
Room
61Identify Key Associations among Objects
- A Hotel has Rooms.
- A Guest stays in a Room.
- A Guest plans to stay at a Hotel.
- A Plan to Stay is recorded as a Reservation.
62A Hotel has Rooms.
63A Guest stays in a Room.
64A Guest plans to stay at a Hotel.
65A Plan to Stay is recorded as a Reservation.
66Problem for the Week
67Modelling In Teams
- identify at least 2 objects from your
transformed narrative and 1 person - Write some simple sentences linking them together
- Draw a simple class diagram representing their
associations with each other