Beruflich Dokumente
Kultur Dokumente
Function Function
Data
Function
An object has:
interface Function
behaviour
identity Data
state
Interface: Identity:
Method signatures Address or instance ID
Behaviour: State:
Algorithms in methods Internal variables
A dot product
And possibly many other
A cross product member functions
Magnitude
}
const means state of object does
not change (vector remains the same)
when this function is used
Introduction to OOAD Stefan Kluth 13
1.4 Object Interactions
Objects interact through their interfaces only
Objects manipulate their own data
but get access to other objects data
through interfaces
Construction: Destruction:
Create object at run-time Destroy object at run-time
Initialise variables Deallocate (free) resources
Allocate resources 0 Destructor member function
0 Constructor member functions
B::doSomething C::doSomething
B::display C::display
B::cleanup C::cleanup
SA/SD: OO: