Object model Flashcards
(19 cards)
What is an object?
Runtime instances of classes
How do object communicate
Message passing
How do objects work?
Computation in objects take place in that they:
- Store data and implement behaviour
- Are linked together in a network
- Communicate through messages
How are objects and classes connected?
Objects are described at compile time by classes and in runtime these classes act as blueprints for the creation of objects
Class Notation: Class Icons
Class icons
- Name
- Optionally show attributes and operations (in class diagrams)
Class Notation: Class features
Access levels:
- Public (+)
- Private (-)
Object Icons
State
Behaviour
Identity
What is state?
Value held in an object
What is behaviour?
The functionality an object contains
What is object identity?
A distinguishing property of an object
- NOT an attribute value
- Could be obj memory address
What are links?
References from one object to another shown as links in UML
What do associations need:
A name (not shown)
A role name at each end derived from the field name
A multiplicity at either end
An arrow head illustrating navigability
How do messages play into OO and UML?
A message corresponds to a method call.
What is message passing?
Object communication.
Collaborations
Object diagrams with messages show collabs in which multiple messages are shown on one diagram
How are return values represented in UML
:=
What is generalization?
Best similarity is java extension relationships, ie inheritance
Properties of generalisation
Gives rise to links between objects
Unlabelled
Never has multiplicities
What is polymorphic association?
Polymorphic association is a term used in discussions of object–relational mapping, a relationship from one class to multiple classes.