Object Orientated Design Flashcards
Object Orientation
Organise the software as a collection of discrete objects that incorporate data structure and behaviour.
Reusability
Objects, if defined well, are reusable in different situations.
Object
Something you can interact with, and behaves differently depending on the state that it is in.
Contains:
- behaviour
- state
- identity
Object State
The data which encapsulates it.
Object Behaviour
The way an object acts and reacts.
Object Interface
An object’s public interface defines which messages it will accept.
Objects may have several interfaces which are viewpoints on the methods provided.
Purpose of classes
- Encapsulation
- Convenient way of describing a collection of objects which have same properties
- Classes are used in the same way that types are used in other languages.
Inheritance
Sharing attributes and operations among other classes based upon hierarchy.
Composition is normally better.
Polymorphism
Allows programmer to use subclasses anywhere that a superclass exists.
Dynamic Binding
Objects determines which code to execute as the result of a method call on a base type.
UML Uses
- specifying
- visualising
- documenting
Noun Analysis
Analyses documentation in terms of nouns, and which ones can be used as classes.
Every noun is a class, but not every class is a noun.
Nouns can either be a class name or an attribute name.