Académique Documents
Professionnel Documents
Culture Documents
com
GupShupStudy.com 1
GupShupStudy.com 2
GupShupStudy.com 3
Hierarchy
Modularity
Encapsulation
Abstraction
Object Orientation
GupShupStudy.com 4
What is Abstraction?
www.gupshupstudy.com
Salesperson
Not saying
Which
salesperson
just a
salesperson
in general!!!
Customer
Product
Manages Complexity
5
GupShupStudy.com 5
What is Encapsulation?
www.gupshupstudy.com
Improves Resiliency
6
GupShupStudy.com 6
What is Modularity?
www.gupshupstudy.com
Order
Fulfillment
Billing
Manages Complexity
7
GupShupStudy.com 7
What is Hierarchy?
www.gupshupstudy.com
Levels of abstraction
Asset
Increasing
abstraction
Security
BankAccount
Savings Checking
Decreasing
abstraction
Stock
RealEstate
Bond
GupShupStudy.com 8
GupShupStudy.com 9
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
10
GupShupStudy.com 10
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
11
GupShupStudy.com 11
What is an Object?
www.gupshupstudy.com
Conceptual entity
Chemical Process
Software entity
Linked List
12
GupShupStudy.com 12
13
GupShupStudy.com 13
Representing Objects
www.gupshupstudy.com
ProfessorClark
Class Name Only
Professor Clark
ProfessorClark :
Professor
GupShupStudy.com 14
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
15
GupShupStudy.com 15
What is a Class?
www.gupshupstudy.com
OO Principle: Abstraction
16
GupShupStudy.com 16
Sample Class
www.gupshupstudy.com
Class
Course
Properties
Name
Location
Days offered
Credit hours
Start time
End time
Behavior
Add a student
Delete a student
Get course roster
Determine if it is full
a + b = 10
17
GupShupStudy.com 17
Representing Classes
www.gupshupstudy.com
a + b = 10
Professor
Professor Clark
18
GupShupStudy.com 18
Class Compartments
www.gupshupstudy.com
Professor
name
empID
create( )
save( )
delete( )
change( )
19
GupShupStudy.com 19
Classes of Objects
www.gupshupstudy.com
20
GupShupStudy.com 20
Objects
Professor
Professor Smith
Professor Mellon
Professor Jones
21
GupShupStudy.com 21
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
22
GupShupStudy.com 22
What is an Attribute?
www.gupshupstudy.com
Object
Class
Attribute
Attribute Value
:CourseOffering
CourseOffering
number = 101
startTime = 900
endTime = 1100
number
startTime
endTime
:CourseOffering
number = 104
startTime = 1300
endTime = 1500
23
GupShupStudy.com 23
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
24
GupShupStudy.com 24
What is an Operation?
www.gupshupstudy.com
CourseOffering
Class
Operation
addStudent
deleteStudent
getStartTime
getEndTime
25
GupShupStudy.com 25
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
26
GupShupStudy.com 26
What is Polymorphism?
www.gupshupstudy.com
Manufacturer A
Manufacturer B
Manufacturer C
OO Principle:
Encapsulation
27
GupShupStudy.com 27
What is an Interface?
www.gupshupstudy.com
Shape
Pyramid
Draw
Move
Scale
Rotate
Cube
Realization relationship
28
Interface Representations
www.gupshupstudy.com
Tube
Elided/Iconic
Representation
(lollipop)
Pyramid
Shape
Canonical
(Class/Stereotype)
Representation
Cube
Tube
<<interface>>
Shape
Pyramid
Draw
Move
Scale
Rotate
Cube
29
GupShupStudy.com 29
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
30
GupShupStudy.com 30
What is a Component?
www.gupshupstudy.com
<<EXE>>
Executable
Name
31
OO Principle:
Encapsulation
Component
Interface
<<DLL>>
Component
Name
GupShupStudy.com 31
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
32
GupShupStudy.com 32
What is a Package?
www.gupshupstudy.com
Package Name
OO Principle:
Modularity
Uses
Organize the model under development
A unit of configuration management
33
GupShupStudy.com 33
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
34
GupShupStudy.com 34
What is a Subsystem?
www.gupshupstudy.com
Subsystem
<<subsystem>>
Subsystem Name
Interface
Interface
GupShupStudy.com 35
Implementation Model
Component
Name
<<subsystem>>
Component Name
Component
Interface
Component
Interface
GupShupStudy.com 36
Object
Class
Attribute
Operation
Interface (Polymorphism)
Component
Package
Subsystem
Relationships
37
GupShupStudy.com 37
Relationships
www.gupshupstudy.com
Association
Aggregation
Composition
Dependency
Generalization
Realization
38
GupShupStudy.com 38
Relationships: Association
www.gupshupstudy.com
Professor
University
Works for
Association
Class
Role Names
University
Professor
Employee
39
Employer
GupShupStudy.com 39
Relationships: Aggregation
www.gupshupstudy.com
Part
Schedule
Student
Aggregation
40
GupShupStudy.com 40
Relationships: Composition
www.gupshupstudy.com
Whole
Schedule
Student
Aggregation
41
GupShupStudy.com 41
GupShupStudy.com 42
Association: Multiplicity
www.gupshupstudy.com
Unspecified
Exactly one
1
Zero or more (many, unlimited) 0..*
*
One or more
Zero or one
Specified range
Multiple, disjoint ranges
43
1..*
0..1
2..4
2, 4..6
GupShupStudy.com 43
Multiplicity
Student
0..*
Schedule
Navigation
44
GupShupStudy.com 44
Relationships: Dependency
www.gupshupstudy.com
Class
Package
ClientPackage
Supplier
Component
Supplier
Client
Dependency
relationship
SupplierPackage
Dependency
relationship
45
GupShupStudy.com 45
Relationships: Generalization
www.gupshupstudy.com
Generalization is an is-a-kind of
relationship
46
GupShupStudy.com 46
Superclass
(parent)
Account
balance
name
number
Withdraw()
CreateStatement()
Generalization
Relationship
Subclasses
Checking
Savings
Withdraw()
GetInterest()
Withdraw()
Descendents
47
GupShupStudy.com 47
Animal
multiple
inheritance
Airplane
Helicopter
Bird
Wolf
Horse
GupShupStudy.com 48
GupShupStudy.com 49
GroundVehicle
Superclass
(parent)
weight
licenseNumber
owner
0..*
Person
register( )
generalization
Subclass
Truck
Car
size
Trailer
tonnage
getTax( )
50
GupShupStudy.com 50
Relationships: Realization
www.gupshupstudy.com
Component
Subsystem
Interface
Interface
Interface
Elided form
Use Case
Use-Case Realization
51
GupShupStudy.com 51
Sale
seller
Salesperson
buyer
item sold
Customer
Corporate
Vehicle
Product
Individual
54
shipping mechanism
Truck
Train
GupShupStudy.com 52
seller
Salesperson
Sale
buyer
item sold
Customer
Corporate
Product
Truck
Individual
shipping mechanism
Vehicle
Train
Airplane
GupShupStudy.com 53
56
GupShupStudy.com 54
Stereotypes
www.gupshupstudy.com
57
GupShupStudy.com 55
Example: Stereotypes
www.gupshupstudy.com
<<boundary>>
<<boundary>>
<<trace>>
DesignClass
<<Processor>>
Processor #1
Processor #1
58
GupShupStudy.com 56
Notes
www.gupshupstudy.com
MaintainScheduleForm
59
GupShupStudy.com 57
Tagged Values
www.gupshupstudy.com
anObject : ClassA
{location=server}
60
GupShupStudy.com 58
Constraints
www.gupshupstudy.com
Professor
Member
1..*
Department Head
1
Department
{subset}
1
GupShupStudy.com 59