Exam Review Flashcards

1
Q

Three types of Cohesion?

A

1 - Operation cohesion: The degree to which an operation focuses on a single functional requirement. 2 - Class cohesion: The degree to which a class is focused on a single requirement. 3 - Specialisation: The semantic cohesion of inheritance hierarchies. A class should only a subclass of a class if the former represents a subset of the latter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the Liskov Principle?

A

A derived object can be treated as if it were a base object. Note that by base and derived object we mean in terms if class inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main principles of USDP and role of phases and workflows?

A

A process that is use-case driven, architecture-centric, iterative, and incremental. It is based on the iteration of phases, each of which consists of workflows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain in what sense eXtreme Programming is Agile?

A

XP is Agile in the sense that there is no emphasis on early analysis and design documentation. It is suitable when requirements are subject to important changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

4 Main principles if eXtreme Programming?

A

Communication (User Devs), Simplicity (choose always the simplest solution), Feedback (use it to avoid unjustified optimism) and Courage ( rather than trying to fix unfixable code to restart from scratch).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a component?

A

A replaceable part of a system defined primarily in terms of interfaces it provides and requires to operate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 4 types of visibility?

A

1 - Public (accesible by any class) 2 - Private (accessible by the class it belongs to) 3 - Protected (Access by the class that includes it or a subclass) 4 - Package (Access to objects in the same package)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the Facade Pattern and the cost to use it?

A

Provides a clear interface to a software component consisting of several classes. Apart from design and implementation, additional message passing is introduced as overheads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How are WhiteBox and BlackBox used in Reuse?

A

Whitebox allows for reuse of other artefacts other than software components. Blackbox needs a level of granularity higher than that of classes due to class coupling. Whitebox offers more reuse mechanisms including inheritance, templates and parameterizations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What businesses are good for Reuse?

A

Companies with large portfolio of projects and/or large product range with common subparts, consultancy firms in vertical markets, companies that design embedded software…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 3 workflows of SELECT Perspective?

A

1 - Supply (Deliver and maintain components) 2 - Manage (Acquire, publish and retrieve components) 3- Consume (Deliver solutions based on reusable components produced by suppliers)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Pattern?

A

An abstract solution to a commonly reoccurring problem in a given context.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does a Pattern Template consist of?

A

Name: Problem: Context: Forces: Solution:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the 3 types of Patterns?

A

Creational Patterns, which are concerned with the construction of instances. Structural Patterns, which are concerned with how classes and objects are organised. Behavioural Patters, which addressed issues that arise when assigning responsibilities to classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the Singleton Pattern?

A

How do we ensure only one instance exists the class is created? Create a class with a class operation getInstance(), which when a class is first accessed an instance is created and returns the objects identity to the requesting object. On subsequent access of the getInstance() operation no additional instance is created but the identity is returned to the requesting object. Note that the class constructor is made private else other objects could invoke it!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the Composite Pattern?

A

How to represent whole hierarchies so that both the whole and part objects offer the same interface to client objects? Resolved by combining inheritance and aggregation hierarchies. Both the subclasses leaf and composite have polymorphically redefined operation anOperation(). In composite, a simple loop construct invokes the leaf’s operation. Also, has an additional operation to add/remove components from the aggregation hierarchy.

17
Q

What is the State Pattern?

A

An object has different behaviours dependent on its state and responds differently according to its state. Solution is to have one subclass for each state of the class. Each of these objects have the sole responsibility of the state’s behaviour as a subclass inherits the parent’s properties and methods. Methods are redefined in the subclasses so that the correct behaviour is encapsulated.

18
Q

What is coupling?

A

A measure of how design components are interconnected / dependent to each other. Lower the better.

19
Q

What is cohesion?

A

A measure of the degree to which an element contributes to a single purpose. Higher is better.

20
Q

When does one use Non-Algorithmic logic description?

A

Use for non-complex operations. Focuses on the ‘what’ or result (blackbox) over the ‘how’ the result is achieved. And possibly if no decision has been made in terms of the best way to achieve the result.

21
Q

When does one use Algorithmic logic description?

A

Used for complex operations (can be constructed top down). Used when a decision has been made about the best method to use. Good for detailed specification, good for analysis and good for those not familiar with specifications.

22
Q

What are Associations?

A

A logical connection between 2 instances, commonly between classes. An association describes possible links between instances that may represent either a logical relationship or message passing.