Professional Documents
Culture Documents
Chapter 4
Squeak: Object-oriented design
with multimedia applications
Unified Modeling Language
• Bottom is services
turn:
move:
moveTo:
turn:
• Lines are
relationships NamedBox
name
• Generalization-specialization or IsA
• NamedBox IsA Box
• Diagram: Triangle on the relationship line
• Association or HasA
• Box HasA Pen
• Diagram: Just a relationship line
• Aggregation is a part-whole relationship, but not exclusive
• Diagram: Open diamond on the line
• Composition is a part-whole relationship that is exclusive
• Diagram: Closed diamond on the line
• Dependency or TalksTo
• Dependency is sort of temporary HasA
• Diagram: Dashed line in UML
• Navigability
• Both ways or just one? Who knows about the other?
• Does the Box have the Pen or the Pen have the Box?
• Usually added later in the process
• Book is wrong on bidirectional (no arrows is
bidirectional, not double arrows.)
• Multiplicities
• How many Pens per how many Boxes?
• Can add labels to indicate how reference is
viewed
Reserve book
Borrow book
Return book
* getsScheduleFrom 1
Registrar gradeForCourse:
Section takenCourse:
assigns
enrollInClass: *
gradeInCourse: daysAndTime getSectionsFor:
takenCourse: roster enrollInSection:
* addStudent dropFromSection:
removeStudent * 1
majorsIn *
CourseGrade
taughtIn manages
1 1 *
1 givenFor * grade
Department Course termEnrolled
1..3 * *
owns name
requiredCourses number hasPrereqs
0..3
creditHours prereqs
Apply for
Admission
Enroll in
the University Admissions
Student Enroll in
a Course
Withdraw
from a Course
EnrollInClass ( Add a Transcript )
Graduate [ All courses must be completed ]
return sections
enrollInSection:
takenCourse: prerequisite
state of prereq
[havePrereq] addStudent:
enrolled enrolled