Application Development Flashcards

1
Q

there are three (3) important characteristics of a bad design architecture that should be avoided:

A

Rigidity, Fragility, Immobility

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

The software is hard to change because every applied change will affect many parts of the software.

A

Rigidity

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

When applying changes, unexpected parts of the software breaks..

A

Fragility

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

The modules of the software are hard to reuse ins another software because these cannot be extracted from
the current software

A

Immobility

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

s are a set of guidelines
to be followed that helps developers arrange methods and data structures into classes,

A

Design principles

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

Martin assembled a set of five (5) software design principles, and Michael Feathers arranged these principles into an acronym
called SOLID.

A

(SRP), (OCP) , (LSP) , (ISP) , (DIP)

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

S-O-L-I-D

A

(SRP), (OCP) , (LSP) , (ISP) , (DIP)

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

This is one of the basic principles most developers apply to build robust and
maintainable software.

A

S: Single Responsibility Principle (SRP)

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

This suggests that each software module, class, or interface should have only one (1) reason to
change.

A

S: Single Responsibility Principle (SRP)

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

This states that for a software to be easy to change,

A

O: Open-Closed Principle (OCP)

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

the software classes must be designed to allow the behavior of those classes to be changed by adding new code rather than changing existing code.

A

O: Open-Closed Principle (OCP)

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

Barbara Liskov introduced this principle which states that the derived classes should be substitutable for their base classes to build a software from interchangeable modules or classes.

A

L: Liskov Substitution Principle (LSP)

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

This principle advises software designers to avoid depending on things that they don’t use.

A

I: Interface Segregation Principle (ISP)

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

This principle suggests that flexible software are those with classes that depend on abstract classes or interfaces.

A

D: Dependency Inversion Principle (DIP)

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

The blank instructs developers to design each module, interface, or class of a software system to
have only one (1) responsibility.

A

Single Responsibility Principle (SRP)

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

The accounting personnel is responsible
for computing the salary of an employee.
It should use the calculatePay()
method

A

Single Responsibility Principle (SRP)

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

The human resource personnel is
responsible for creating a report of hours
of an employee. It should use the
reportHours() method.

A

Single Responsibility Principle (SRP)

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

The database administrator is
responsible for saving an employee’s
details. It should use the
saveEmployee() method.

A

Single Responsibility Principle (SRP)

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

The blank states that software modules, interfaces, or classes should be open for extension but closed
for modification.

A

Open-Closed Principle (OCP)

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

For every newly added method, the unit testing of the software should
be done again.

A

Open-Closed Principle (OCP)

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

When a new requirement is added, the maintenance and adding
function may take time.

A

Open-Closed Principle (OCP)

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

Adding a new requirement might affect the other functionality of
software even if the new requirement works.

A

Open-Closed Principle (OCP)

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

To blank , use an interface,
an abstract class, or abstract methods to
extend the functionality of the class

A

Implement the OCP

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

The blank suggests that when creating a new derived class of an existing class, make sure that the
derived class can be a substitute for its base class.

A

Liskov Substitution Principle (LSP)

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

The blank should be extended to the level of architecture. A simple violation of substitution can cause a system’s architecture to
break.

A

LSP

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

The blank suggests avoiding depending on things that are not used.

A

Interface Segregation Principle (ISP)

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

This means that clients
should not be forced to implement interfaces they don’t use. I

A

Interface Segregation Principle (ISP)

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

The blank suggests that the most flexible software systems are those in which source code
dependencies refer only to abstractions, not to concretions.

A

Dependency Inversion Principle (DIP)

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

software engineer, blank are the reusable solutions to commonly occurring problems in software design.

A

design patterns

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

Design patterns are said to have four (4) essential features:

A

Pattern Name, Problem, Solution, Consequences

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

This is the name of a pattern that can be used to describe a design problem, its solution, and consequences.

A

Pattern Name

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

This describes when to use the pattern. It explains the problem and its context.

A

Problem

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

This describes the elements that make up the design, their relationships, responsibilities, and collaborations.
The pattern provides an abstract description of a design problem and how a general arrangement of element solves it.

A

Solution

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

These are the results and interchanges of applying the pattern to the problem. They include time and space tradeoffs, but also flexibility, extensibility, and portability, among others.

A

Consequences

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

3 Categories of Patterns

A

Creational Patterns, Structural Patterns, Behavioral Patterns

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

These patterns deal with when and how objects are created. These provide object creation
mechanisms that increase flexibility and reuse of existing codes.

A

Creational Patterns

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

These describe how objects are composed into larger groups and explain how to assemble objects and classes into larger structures while keeping their structures flexible and efficient.

A

Structural Patterns

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

These describe how responsibilities are distributed between objects in the design and how communication happens between objects.

A

Behavioral Patterns

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

are all about class instantiation. These are patterns that deal with object creation mechanisms, trying
to create objects in a manner suitable to a certain situation.

A

Creational design patterns

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

This design pattern lets developers ensure that a class has only one (1) instance while providing a global
access point to the instance.

A

Singleton Pattern

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

Ensure that a class has just a single instance. This is to control access to some shared resource—for example, a database
or a file.

A

Singleton Pattern

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

. Make the default constructor private to prevent other objects from using the new operator with a Singleton class

A

Singleton Pattern

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

the Singleton class declares the static method
getInstance() that returns the same instance of its own class.

A

Singleton Pattern

44
Q

This provides an interface for creating objects in a superclass but allows subclasses to alter the
type of object that will be created.

A

Factory Method Pattern

45
Q

A developer is creating a logistics management application.

A

Factory Method Pattern

46
Q

The Factory Method pattern suggests that he replace direct object construction using the new operator with calls to a
special factory method.

A

Factory Method Pattern

47
Q

Product declares the interface, which is
common to all objects that can be produced by the
creator and its subclasses.

A

Factory Method Pattern

48
Q

This creational design pattern lets a developer copy existing objects without making his code
dependent on their classes

A

Prototype Pattern

49
Q

When a developer wants to create an exact copy of an object, s/he has to create a new object of the same class.

A

Prototype Pattern

50
Q

The Prototype pattern delegates the cloning process to the actual objects being cloned

A

Prototype Pattern

51
Q

, the Prototype interface declares the cloning methods. In
most cases, it is a single clone method.

A

Prototype Pattern

52
Q

This allows developers to produce families of related objects without specifying their concrete classes.

A

Abstract Factory Pattern

53
Q

A developer is creating a furniture shop simulator.

A

Abstract Factory Pattern

54
Q

Explicitly declare interfaces for each distinct product of the product family.

A

Abstract Factory Pattern

55
Q

the Abstract Products declare
interfaces for a set of distinct but related
products which make up a product family.

A

Abstract Factory Pattern

56
Q

This creational design pattern allows developers to construct complex objects step by step. The pattern
allows developers to produce different types and representations of an object using the same construction code.

A

Builder Pattern

57
Q

When creating an object that requires complex step-by-step initialization of many fields and nested objects, the
initialization of an object will usually contain lots of parameters or will scatter all over the client code.

A

Builder Pattern

58
Q

The Builder design pattern suggests that developers must extract the object construction code out of its own class and
move it to separate objects called builders.

A

Builder Pattern

59
Q

the Builder interface declares product construction
steps that are common to all types of builders. ConcreteBuilder
classes provide different implementations of the construction steps.

A

Builder Pattern

60
Q

deal with the arrangement and relationship between the classes in the software system.

A

Structural design patterns

61
Q

This structural design pattern allows objects with incompatible interfaces to collaborate. This pattern
converts the interface of a class into another interface as expected by the client application

A

Adapter Pattern

62
Q

For example, a developer developed a stock monitoring software for a certain client.

A

Adapter Pattern

63
Q

In the Adapter pattern, a developer can create a special object called adapter that converts the interface of one (1) object
so that another object can understand it

A

Adapter Pattern

64
Q

the Client class contains the existing business
logic of the program.

A

Adapter Pattern

65
Q

This allows the developers to split a large class or a set of closely related classes into two (2) separate
hierarchies, which are abstraction and implementation, that can be developed independently of each other

A

Bridge Pattern

66
Q

For example, a developer created a Shape class with a pair of subclasses: Circle and Square.

A

Bridge Pattern

67
Q

The given problem occurs because the developer is trying to extend the shape classes in two (2) different dimensions: by
form and by color.

A

Bridge Pattern

68
Q

the Abstraction provides high-level
control logic. It relies on the implementation object
to do the actual low-level task.

A

Bridge Pattern

69
Q

Composite Pattern – This design pattern allows developers to compose objects into tree structures and then work with
these structures treating them as individual objects

A

Composite Pattern

70
Q

A developer created two (2) types of objects named Products and Boxes.

A

Composite Pattern

71
Q

The Composite pattern suggests that a developer must work with Products and Boxes through a common interface which
declares a method for calculating the total price.

A

Composite Pattern

72
Q

the Component interface describes operations that are common
to both simple and complex elements of the tree.

A

Composite Pattern

73
Q

This allows developers to attach new behaviors to objects by placing these objects inside special
wrapper objects that contain the behaviors

A

Decorator Pattern

74
Q

A developer is working on a notification library that lets other programs notify their users about important events.

A

Decorator Pattern

75
Q

The Decorator pattern suggests creating a wrapper object that can be linked with some target object.

A

Decorator Pattern

76
Q

the Component declares the common interface for
both wrappers and wrapped objects.

A

Decorator Pattern

77
Q

This provides a simplified interface to a library, a framework, or any other complex set of classes

A

Facade Pattern

78
Q

A developer is creating a code that works with a broad set of objects that belong to a sophisticated library or framework.

A

Facade Pattern

79
Q

A facade is a class that provides a simple interface to a complex subsystem which contains lots of moving parts.

A

Facade Pattern

80
Q

the provides convenient access to a particular part of the subsystem’s functionality. It knows where
to direct the client’s request and how to operate all the moving parts.

A

Facade Pattern

81
Q

This allows developers to fit more objects into the available amount of RAM by sharing common parts
of state between multiple objects instead of keeping all of the data in each other

A

Flyweight Pattern

82
Q

A developer creates a video game with realistic particle system of multiple bullets, missiles, and explosions

A

Flyweight Pattern

83
Q

The Flyweight pattern suggests creating an object that is divided into two (2) parts: the state-dependent part and the stateindependent part.

A

Flyweight Pattern

84
Q

the pattern is merely an
optimization. Before applying it, make sure that a
program does have the RAM consumption problem
related to having a massive number of similar objects
in memory at the same time.

A

Flyweight Pattern

85
Q

This design pattern allows developers to provide a substitute or placeholder for another object.

A

Proxy Pattern

86
Q

controls access to the original object, allowing developers to perform something before or after the requests gets through
to the original object

A

Proxy Pattern

87
Q

Developers want to control access to an object. For example, a developer
has a large object that consumes a tremendous amount of system
resources

A

Proxy Pattern

88
Q

The Proxy pattern suggests creating a new proxy class with the same
interface as an original service object and updating the application

A

Proxy Pattern

89
Q

the Service Interface declares the interface of the Service. The proxy must follow this interface to be
able to disguise itself as a service object.

A

Proxy Pattern

90
Q

are concerned with how classes and objects behave in a system software and how objects
communicate with each other

A

Behavioral design patterns

91
Q

This design pattern allows developers to traverse elements of a collection without exposing its underlying
representation, such as list, stack, and tree.

A

Iterator Pattern

92
Q

A developer is creating a system with a search feature.

A

Iterator Pattern

93
Q

The main idea of the Iterator pattern is to extract the search behavior of a collection into a separate object called an
iterator

A

Iterator Pattern

94
Q

the Iterator interface declares the operations
required for traversing a collection: fetching the next element,
retrieving the current position, restarting iteration, etc.

A

Iterator Pattern

95
Q

This design pattern allows developers to define a subscription mechanism to notify multiple objects
about any events that happen to the object they are observing. This means that when an object changes state, all of its
dependents are notified and updated automatically

A

Observer Pattern

96
Q

A developer created two (2) types of objects named Customer and Store

A

Observer Pattern

97
Q

The object that notifies other objects about the changes to its state is called publisher

A

Observer Pattern

98
Q

the Publisher class issues events of interest to
other objects.

A

Observer Pattern

99
Q

This allows developers to define a family of algorithms, put each of them into a separate class, and make
their objects interchangeable.

A

Strategy Pattern

100
Q

A developer created a navigation application for travelers

A

Strategy Pattern

101
Q

The Strategy pattern suggests defining the class that does a specific task in several different methods and extracts all of these algorithms into separate classes called strategies

A

Strategy Pattern

102
Q

the Context class maintains a reference to
one of the concrete strategies and communicates with this
object only through the Strategy interface

A

Strategy Pattern

103
Q
A
104
Q
A
105
Q
A