Fichas
Object Oriented Design, Analysis and Programming
Fichas del conjunto (25)
- 1ClassBlueprint for an object. Defines the generic behaviour of an object and the type of data it might store. Named using a noun
- 2ObjectInstance of a class. Represents data and related behaviours
- 3Advantages of Objects and ClassesAid generalization and specialization
Reuse
Encourages accountability and responsibility
Represents the real world - 4Disadvantages of Objects and ClassesCan limit creativity
RIsk of overcomplicating design i.e. inheritence, abstraction, encapsulation - 5PublicAccessible from anywhere within or without the application
- 6PrivateOnly accessible within the class
- 7ProtectedOnly accessible with the class and its subclasses
- 8AttributeA named property of a class that describes a range of values that instances of the property may hold
- 9OperationAn implementation of a service that can be requested from any object of the class to affect behaviour
- 10CRC ProcessClasses, Responsibility and Collaborations
- List of candidate classes
- What do they need to know
- What they do
- Who they need to work with to do this (collaborations) - 11EncapsulationThe process of an object controlling outside access to its inernal data
Client only knows how to call the methods, not how the methods are implemented
Data attributes are made private
Visible services are made public - 12Benefits of encapsulationCan change the implementation of the object without affecting the whole program
Any change of the data representation will affect only the implementation of the methods - 13CohesionA measure of how well a component "fits together"
Should implement a single logical entity or function
When a change has to be made, it is localised in a single cohesive component - 14CouplingA measure of the inter-connections between system components
Loose coupling means component changes are unlikely to affect other components
Avoid placing too many responsibilities within a single object - 1510 OOP Design principles (Head FIrst OO Anaysis and Design)1. Don't repeat yourself
2. Ecapsulate what changes
3. Open Closed esign principle
4. Single Responsibility Principle
5. Dependency Inversion Principle
6. Favour Composition over Inheritence
7. Liskov Substitution Principle
8. Interface Segregation Principle
9. Programming for interface
10. Delegation principle - 16Don't Repeat Yourself (DRY)Avoid duplication in code
- 17Encapsulate what changesHide implementation detail, help maintenance
- 18Open Closed design principleOpen for extension, closed for modification
- 19Single Responsibility Principle (SRP)One class should do one thing and do it will
- 20Dependency Inversion Principle (DIP)Don't ask, let the framework give it to you
- 21Favour Composition over InheritenceCode reuse without cost of inflexibility
- 22Liskov Substitution Principle (LSP)Sub-type must be substitutable for super type
- 23Interface Segregation Principle (ISP)Avoid monolithic interface, reduce pain on client side
- 24Programming for interfaceHelp maintenance, improve flexibility
- 25Delegation principleDon't do all things by yourself, delegate it
Información
- Descripción
- Project Management Fichas sobre Object Oriented Design, Analysis and Programming, creado por Clare Daly el 27/09/2016.
- Creado por
- Clare Daly
- Visitas
- 5
- Etiquetas
- Valoración