3 ConceptObjectOriented Part1
3 ConceptObjectOriented Part1
with Java
(CT038-3-2)
Prepared by: Lee Kim Keong First Prepared on: June 13 Last Modified on: April 19
Quality checked by: null
Copyright 2019 Asia Pacific University of Innovation and Technology
Learning outcome
– Software entity
Linked List
CT038-3-2 Object Oriented Development with Java Concepts of Object Oriented
A More Formal Definition
Attributes
• An object is an entity
with a well-defined
boundary and identity
that encapsulates state
and behavior.
– State is represented by
attributes and relationships.
– Behavior is represented by
operations, methods, and
Object
state machines.
Operations
)
s(
Co
de
ur
se
ra
O
G
ff e
al
rin
in
g
itF
()
bm
Su
Se
tM
Professor Clark’s behavior
ax
Lo
Submit Final Grades
ad
) (
Accept Course Offering TakeSabbatical()
Take Sabbatical
Set Max Load Professor Clark
CT038-3-2 Object Oriented Development with Java Concepts of Object Oriented
An Object Has Identity
Named Object
: Professor
Professor J Clark
Anonymous Object
Properties Behavior
Name Add a student
Location Delete a student
Days offered Get course roster
Credit hours Determine if it is full
Start time
End time
+ submitFinalGrade()
+ acceptCourseOffering()
+ setMaxLoad()
– The behavior (operations) + takeSabbatical()
+ teachClass()
Professor
Class
:Student
- name = “M. Modano”
- address = “123 Main St.”
Student - studentID = 9
- name - dateOfBirth = “03/10/1967”
- address
- studentID Objects
- dateOfBirth
:Student
- name = “D. Hatcher”
- address = “456 Oak Ln.”
- studentID = 2
- dateOfBirth = “12/11/1969”
CT038-3-2 Object Oriented Development with Java Concepts of Object Oriented
What Is an Operation?
+ get tuition()
+ add schedule()
Operations + get schedule()
+ delete schedule()
+ has prerequisites()
University
Artifacts
University
Artifacts Course Schedule
Student CourseOffering
• What is an object?
• What is a class? How are classes and objects
related?
• What is an attribute? An operation?
• Why use packages?