Monday, 15 April 2013
Blog Task - Encapsulation and Visibility
Accessors and Mutators allow exterior objects read or modify access to an objects public states and behaviours.
In UML diagrams each Accessor and Mutator is preceeded by a plus sign, ( + ), which identifies that the object state or behaviour is public.
In UML diagrams a minus sign, ( - ), denotes a state or behaviour is private, and as such is not acceable by on outside object.
What is an Accessor?
An Accessor allows outside objects to read the state or behaviour of an object.
Accessors are also known as Getters.
What is a Mutator?
A Mutator allows outside objects to modify the state or behaviour of an object.
Accessors are also known as Setters.
Original Post Jun 23rd 2012
Labels:
Accessor,
Encapsulation,
Getter,
Java,
Mutator,
Programming,
Setter,
UML,
Visibility
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment