Which of these are desirable characteristics of a software design? (Choose the three)
reusability, flexible, maintainability
2
New cards
You are writing out a CRC card for a bank machine component. Under which section should you put "Track Cash Remaining."
Responsibility
3
New cards
Which two of these are likely to be a part of conceptual design?
Mockups, CRC Cards
4
New cards
When during the design process are you likely to produce CRC cards the most?
conceptual design
5
New cards
An object which is responsible for showing data to the user could be considered which category of object?
boundary
6
New cards
What is a requirement of this form called? "As a ____, I want to ____, so that ____".
user story
7
New cards
You are a programmer creating software for a bank machine system. Which section of a CRC card for the bank machine component will the "User" go into?
Collaborator
8
New cards
Some of the earliest computing languages supported:
main program and subroutines
9
New cards
Sam demonstrated an important part of object-oriented design by putting attributes and behaviours into a DeliveryDriver class and exposing some. Which concept?
encapsulation
10
New cards
Which keywords allow your classes to achieve polymorphism in Java? (Choose 2)
implements, extends
11
New cards
Which is the proper way to show an abstract method in a UML class diagram?
anOperation() (in italics)
12
New cards
There are three different relationships that objects can have. Which best describes the relationship between a Chair and its Legs?
composition
13
New cards
Which is the most desirable?
high cohesion, loose coupling
14
New cards
Information Hiding is closely related to which core design principle?
encapsulation
15
New cards
During model checking, what is the name for a violation of the desired properties of the model?
Counterexample
16
New cards
When two processes cannot run because they are waiting on the same resource, it's called...
Deadlock
17
New cards
You create an object that represents a user, storing important information (preferences). What kind of object?
entity
18
New cards
You create an object that represents a dialog box with buttons and text fields. What kind of object?
boundary
19
New cards
You create an object that compares values and updates the smaller one. What kind of object?
control
20
New cards
Which of these is an example of a quality tradeoff?
Adding security knowing it will reduce speed
21
New cards
What is the term for reducing a class or object to its inputs and outputs in modelling?
black box thinking
22
New cards
Which of these classes is in most need of being decomposed?
Store
23
New cards
Which design principle enables developers to follow D.R.Y.?
generalization
24
New cards
Select the object pairing that has an association relationship:
Hiker - Trail
25
New cards
Select the object pairing that has an aggregation relationship:
Stapler - Staple
26
New cards
Select the object pairing that has a composition relationship:
Book - Page
27
New cards
How can you apply the principle of Separation of Concerns in OOP?
Separate objects or components according to their role in the software
28
New cards
Which of these violates Liskov's Substitution Principle?
an operation in the superclass is replaced by a different operation in the subclass
29
New cards
For which of these situations would you use a sequence diagram?
To show the collaborative behaviour of objects in your program
30
New cards
What is an abstract data type?
a type of data defined by the developer rather than the language
31
New cards
When is the best time to use a design pattern? (Choose 2)
For a commonly encountered issue; When explaining a solution to your fellow developers
32
New cards
What does it mean to "let the subclass decide" in the Factory Method Pattern?
the subclass defines the methods for concrete instantiation...
33
New cards
What do we call the creation of an object with 'new' in Java?
concrete instantiation
34
New cards
Which of these is NOT a common application of the Proxy Pattern?
information proxy
35
New cards
How does a Decorator Pattern work?
builds a behaviour by stacking objects
36
New cards
What are the object types that are used in the Composite Pattern? (Choose 2)
composite, leaf
37
New cards
What is the correct situation for the use of a Chain of Responsibility pattern?
You have multiple potential handlers, but only one will deal with the request
38
New cards
What design principles is the Command Pattern using?
Encapsulation, generalization, loose coupling
39
New cards
When are you most likely to need a Mediator pattern?
When you are coordinating the activities of a set of related classes
40
New cards
Marlon is coding a similar sequence of steps with slight differences depending on object type. Which pattern?
Template pattern
41
New cards
What are the important roles in the Command Pattern?
Command, Receiver, Invoker
42
New cards
You have a complex manufacturing task with sensors and components. Which pattern?
Mediator
43
New cards
You have a security system with modes: normal, lockdown, open. Which pattern?
State
44
New cards
One class is a mailbox, another is the owner who wants to know about new mail. Which pattern?
Observer
45
New cards
Select the two elements of the open/closed principle:
Open for extension; Closed for modification
46
New cards
What is the best description of the Dependency Inversion principle?
Client objects depend on generalizations instead of concrete objects
47
New cards
Which of these statements is true about the Composing Objects principle?
The first statement is true (behaviour with aggregation instead of inheritance)
48
New cards
How can Comments be considered a code smell?
Excessive commenting can be a coverup for bad code
49
New cards
What is the primitive obsession code smell about?
Overuse of primitive data types like int, long, float
50
New cards
You keep adding functionality to one class and it becomes a problem. Which code smell?
Large Class
51
New cards
Why is it important to avoid message chains?
The resulting code is usually rigid and complex
52
New cards
Joseph created a Deck superclass for future card back changes, but it's not used yet. Which smell?
Speculative Generality
53
New cards
What is the act of creating an object called?
concrete instantiation
54
New cards
What is the difference between Factory Method and Simple Factory?
In Factory Method, concrete instantiation is done in a designated method...
55
New cards
José wants to build behaviours by stacking objects. Which pattern?
Decorator Pattern
56
New cards
You need to connect to a third-party library with loose coupling via consistent interface. Which pattern?
Adapter
57
New cards
Which design principle best describes the Proxy pattern?
encapsulation, because the Proxy hides some of the detail
58
New cards
Ashley has a request that could be handled by one of several handlers. Which pattern?
Chain of Responsibility
59
New cards
Which of these is NOT a good use of the Command pattern?
Sending a command to a third-party service or library
60
New cards
Which code smell may become a problem with the Mediator pattern?
Large Class
61
New cards
Which method is found in a typical Observer class?
update()
62
New cards
In the MVC Pattern, which is usually made into an Observer?
View
63
New cards
"A class is considered closed to modification when..." — which does NOT complete accurately?
...its collaborators are fixed
64
New cards
How does Dependency Inversion improve systems?
Client classes become dependent on high level generalizations...
65
New cards
Allison has a search algorithm hard to replace everywhere. Which principle could help?
Dependency Inversion
66
New cards
Which principle do Long Message Chains usually violate?
Principle of Least Knowledge / Law of Demeter
67
New cards
What are the components of the MVC pattern?
Model, View, Controller
68
New cards
Interface Segregation helps avoid which code smell?
Refused Bequest
69
New cards
Project managers and end users — who are stakeholders in the architecture?
Both statements are true
70
New cards
Which UML diagrams for logical view? (Choose 2)
Class diagram; State diagram
71
New cards
You need to show software elements mapped to hardware. Which view?
physical view
72
New cards
What is the name for a physical result like an executable file?
artifact
73
New cards
Which keywords on lines in package diagrams?
merge, access, import
74
New cards
Which of these is NOT shown on an activity diagram?
interfaces
75
New cards
What does 'component' in component diagram refer to?
an independent, encapsulated unit in the system
76
New cards
Guidelines like "easy to learn", "minimize errors" fall under which quality attribute?
usability
77
New cards
Which is NOT a way to promote conceptual integrity?
Split the development team into subteams for each component