Karteikarten
5 Object Design

Karten in diesem Stapel (26)
- 1What are the 4 main activities of object design?1. Reuse: Identification of existing solutions
2. Interface specification
3. Object model restructuring
4. Object model optimization - 2What is the principle of component-based software engineering?The design gap is filled with available components -> 0% coding
- 3What is COTS-Development and what does it comprise?Commercial-off-the-shelf- Development
Design with standard components - 4Name the 3 types of reuse in software engineering- Existing classes
- Existing interfaces
- Design knowledge - 5What are the two techniques to close the object design gap?- Composition (= Black-Box-Reuse)
New class is created by the aggregation of existing classes
- Inheritance (= White-Box-Reuse)
New class by subclassing. New class reuses the functionality of the superclass - 6In which two cases is inheritance used in OOSE?- Identification of taxonomies (during requirement analysis)
- Interface Specification (during object design) - 7What is implementation inheritance?Extends a superclass with a subclass containing a new operation or overriding an existing operation
- 8What is delegation?Catches an operation and sends it to another object
- 9Name one advantage and one disadvantage of delegationAdvantage:
Flexible, because any object can be replaced at run time by another one
Disadvantage:
Inefficent, because objects are encapsulated - 10Name advantages and disadvantages of inheritanceAdvantages:
- Straightforward to use
- Supported by many programming languages
- Easy to implement new functionality in the subclass
Disadvantages:
- Changes in the parents class force to change the subclass as well, at least it requires recompilation - 11How does a method have to be prefixed, if it must not be overridden? (=Strict Inheritance)final
- 12What is contraction?A mechanism where implementations of methods in the super class are overridden with empty bodies in the subclass to make the superclass operations invisible
- 13What are the 2 types of inheritance associations?- Generalization (subclass is discovered first)
- Specialization (superclass is discovered first) - 14Metamodel for inheritance

- 15What are the key benefits of using frameworks? (partial applications that can be specialized to produce custom applications)Reusability:
Leverages application domain knowledge and prior effort of experienced developers
Extensibility:
Methods which can be overridden by the application to extend the framework - 16How can frameworks be classified?By position in the software dev process:
Infrastructure/Middleware/Enterprise Frameworks
By techniques used to extend them:
Black-Box/White-Box Frameworks - 17What is the difference between Black Box and White Box Frameworks?White Box Frameworks:
Extensibility achieved through inheritance
Black Box Frameworks:
Extensibility achieved through delegation - 18What is the difference between Frameworks and Class Libraries regarding the control flow?Frameworks are active and affect the control flow
Class Libraries are passive and have do not influence the control flow - 19Which 3 types of design patterns exist?1. Structural patterns
2. Behavioral patterns
3. Creational patterns - 20Assign following design patterns to one of the 3 design pattern types: - Facade - Proxy - Observer - Composite - Strategy - Bridge - AdapterStructural:
Facade, Proxy, Composite,
Bridge, Adapter
Behavioral:
Strategy, Observer - 21What does the composite pattern allow regarding to problems?Problems can be solved by modelling them as hierarchies with arbitrary width and depth
- 22What is the advantage of the strategy pattern?Switching between algorithms at run time
If a new algorithm is needed, we can add it without disturbing the application or other algorithms - 23What is the advantage of the bridge pattern?The bridge pattern allows to delay the binding between an interface and its subclass to the start-up time of the system
- 24Where is the adapter pattern often used?To provide a new interface for a legacy system (cannot be changed, old system)
- 25What is the difference between Bridge and Adapter Pattern regarding the order of delegation and inheritanceBridge: Delegation first, Inheritance second
Adapter: Inheritance first. delegation second - 26What is the purpose of the observer pattern?Connects the state of an observed object (subject) with many observing objects (observers)
Informationen
- Beschreibung
- Software Engineering Karteikarten am 5 Object Design, erstellt von Maximilian Zeyda am 28/06/2017.
- Erstellt von
- Maximilian Zeyda
- Aufrufe
- 8
- Bewertung