wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Software Design Quiz

Total questions: 103

Worksheet time: 52mins

Name
Class
Date
1.

Which of these are desirable characteristics of a software design? Choose the three correct answers.

a)

reusability

b)

flexible

c)

maintainability

d)

tight coupling

2.

You are writing out a CRC card for a bank machine component. Under which section should you put "Track Cash Remaining"?

a)

Collaborator

b)

Responsibility

c)

Class

d)

Risk

3.

Which two of these are likely to be a part of conceptual design?

a)

Mockups

b)

Abstract data types

c)

Methods

d)

CRC Cards

4.

When during the design process are you likely to produce CRC cards the most?

a)

conceptual design

b)

after releasing the software

c)

customer meetings

d)

technical design

5.

An object which is responsible for showing data to the user could be considered which category of object?

a)

control

b)

representation

c)

boundary

d)

entity

6.

What is a requirement of this form called? "As a ____, I want to ____, so that ____".

a)

conceptual mockup

b)

user story

c)

entity abstraction

d)

key concept

7.

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?

a)

Responsibility

b)

Collaborator

c)

Class

d)

Risk

8.

Some of the earliest computing languages supported:

a)

main program and subroutines

b)

objects and classes

c)

abstract data types

d)

local variables

9.

Sam identified the important attributes and behaviours of a delivery driver and put them all into a DeliveryDriver class, like "takeOrder", "deliverOrder", and "DeliveryArea." She exposed some of these to other classes. She just demonstrated an important part of object-oriented design. Which of these concepts best describes what you did?

a)

decomposition

b)

encapsulation

c)

generalization

d)

abstraction

10.

Which keywords allow your classes to achieve polymorphism in Java? Choose the 2 correct answers

a)

implements

b)

interfaces

c)

inherits

d)

extends

11.

Which is the proper way to show an abstract method in a UML class diagram?

a)

abstract anOperation()

b)

anOperation()

c)

#anOperation()

d)

"anOperation()"

12.

There are three different relationships that objects can have. Which of these best describes the relationship between a Chair and its Legs?

a)

association

b)

aggregation

c)

composition

d)

formation

13.

Which is the most desirable?

a)

high cohesion, tight coupling

b)

low cohesion, tight coupling

c)

high cohesion, loose coupling

d)

low cohesion, loose coupling

14.

Information Hiding is closely related to one of the core design principles of object-oriented design. Which one?

a)

generalization

b)

abstraction

c)

decomposition

d)

encapsulation

15.

During model checking, what is the name for a violation of the desired properties of the model?

a)

Counterexample

b)

Error

c)

Model Gap

d)

Redevelopment

16.

When two processes cannot run because they are waiting on the same resource, it's called…

a)

Deadlock

b)

Transition lock

c)

Mutual lock

d)

State lock

17.

You create an object that represents a user, storing important information about them such as their preferences. What kind of object is this?

a)

boundary

b)

entity

c)

control

d)

client

18.

You create an object that represents a dialog box. It creates buttons and text fields, etc, for the user to interact with, and it logs those interactions. What kind of object is this?

a)

entity

b)

display

c)

interaction

d)

control

e)

boundary

19.

You create an object that compares values from two different sources. It then updates the smaller value to be equal to the larger one. What kind of object is this?

a)

entity

b)

control

c)

repository

d)

update

20.

Which of these is an example of a quality tradeoff?

a)

Not delivering key features so that deadlines can be met

b)

Limiting features knowing that they can be added later

c)

Adding security knowing it will reduce speed

d)

Adding preferences that allow users to switch some features on and off

21.

What is the term for reducing a class or object to its inputs and outputs in modelling?

a)

black box thinking

b)

pipe thinking

c)

process thinking

d)

filter thinking

22.

Which one of these classes is in most need of being decomposed?

a)

Student

b)

Store

c)

Book

d)

Order

23.

Which design principle enables developers to follow the guideline D.R.Y. ("Don't Repeat Yourself")?

a)

generalization

b)

decomposition

c)

abstraction

d)

encapsulation

24.

Select the object pairing that has an association relationship:

a)

Hiker - Trail

b)

Coffee - Water

c)

Book - Page

d)

Tree - Root

25.

Select the object pairing that has an aggregation relationship:

a)

Book - Page

b)

Pie - Crust

c)

Stapler - Staple

d)

Car - Road

26.

Select the object pairing that has a composition relationship:

a)

Tea - Sugar

b)

Book - Page

c)

Record Player - Record

d)

Bear - Forest

27.

How can you apply the principle of Separation of Concerns in object-oriented programming?

a)

Split developers into teams that each deal with different parts of the software

b)

Separate data and actions (methods) into different classes

c)

Ensure classes are only concerned with their own data

d)

Separate objects or components according to their role in the software

28.

Which of these violates Liskov's Substitution Principle?

a)

the superclass is too general

b)

an operation in the superclass is replaced by a different operation in the subclass

c)

subclasses specify the abstract methods of the superclass

d)

the subclass adds behaviour

29.

For which of these situations would you use a sequence diagram?

a)

To show the collaborative behaviour of objects in your program.

b)

To show the different modes that your program can be in.

c)

To show all the different processes of your program.

d)

To show the relationship between classes

30.

When is the best time to use a design pattern? (Choose 2 answers.)

a)

For a problem that is unique to your program

b)

For a commonly encountered issue

c)

When fixing spaghetti code

d)

When explaining a solution to your fellow developers

31.

What does it mean to "let the subclass decide" in the Factory Method Pattern?

a)

the subclass decides which object to create, but calls a method that is defined in the superclass to instantiate the class

b)

the subclass will pass a parameter into a factory that determines which object is instantiated

c)

the subclass defines the methods for concrete instantiation. As such, the type of object is determined by which subclass is instantiated

d)

the subclass chooses the parent class at runtime

32.

What do we call the creation of an object, for example, with the 'new' operator in Java?

a)

object realization

b)

class creation

c)

concrete instantiation

d)

manifestation

33.

Which of these is NOT a common application of the Proxy Pattern?

a)

information proxy

b)

virtual proxy

c)

remote proxy

d)

protection proxy

34.

How does a Decorator Pattern work? (Choose one.)

a)

adding features to a class with a new class

b)

expands the methods of a class with inheritance

c)

encapsulates a class to give it a different interface

d)

builds a behaviour by stacking objects

35.

What are the object types that are used in the Composite Pattern? (Select the two correct answers.)

a)

root

b)

trunk

c)

composite

d)

branch

e)

leaf

36.

What is the correct situation for the use of a Chain of Responsibility pattern?

a)

You need a set of objects to each contribute information on responding to a request

b)

You have multiple potential handlers, but only one will deal with the request

c)

You need to pass a message to multiple receivers

d)

You need to delegate a set of tasks to a hierarchy of objects

37.

What design principles is the Command Pattern using?

a)

Encapsulation, generalization, loose coupling

b)

Encapsulation, generalization, information hiding

c)

Encapsulation, information hiding, loose coupling

d)

Generalization, information hiding, loose coupling

38.

When are you most likely to need a Mediator pattern?

a)

When you want to de-couple a class that is requesting a service from one that is providing it

b)

When your class is sending a request that might be handled by one of several handlers.

c)

When you have two classes with different interfaces that you must connect

d)

When you are coordinating the activities of a set of related classes

39.

Marlon is coding part of the software that follows a similar sequence of steps. Depending on the type of object, these steps will be implemented in slightly different ways, but their order is always the same. Which design pattern could Marlon use?

a)

Template pattern

b)

Mediator pattern

c)

Command pattern

d)

State pattern

40.

What are the important roles in the Command Pattern?

a)

Command, Queue, Receiver

b)

Command, Receiver, Invoker

c)

Sender, Receiver, Invoker

d)

Delegate, Command, Requester

41.

You have a machine performing a complex manufacturing task, with different sensors and different components of the machine represented by different classes. Which design pattern will you use to arrange the parts?

a)

Template

b)

Command

c)

Mediator

d)

Chain of Responsibility

42.

You have a security system class, and it has 3 modes: normal, lockdown, and open. Which pattern would you use to model the behaviour in these different modes?

a)

Template

b)

Mediator

c)

State

d)

Observer

43.

One of your classes represents a mailbox, while another is the owner of the mailbox. The person would like to know when new mail arrives. Which design pattern will you probably use?

a)

State

b)

Observer

c)

Command

d)

Mediator

44.

What is the best description of the Dependency Inversion principle?

a)

Client objects depend on an Adaptor Pattern to interface with the rest of the system

b)

Client objects depend on generalizations instead of concrete objects

c)

Service objects subscribe to their prospective client objects as Observers, watching for a request

d)

Client objects are dependent on a service interface that directs their requests

45.

Which of these statements is true about the Composing Objects principle? 1. it provides behaviour with aggregation instead of inheritance 2. it leads to tighter coupling

a)

The first statement is true

b)

The second statement is true

c)

Neither statement is true

d)

Both statements are true

46.

How can Comments be considered a code smell?

a)

Too many comments make the files too large to compile

b)

When a comment is used to explain the rationale behind a design decision

c)

Excessive commenting can be a coverup for bad code

d)

They can’t! Comments help clarify code

47.

What is the primitive obsession code smell about?

a)

Code that contains many low-level objects, without using OO principles like aggregation or inheritance

b)

Overuse of primitive data types like int, long, float

c)

Using many different primitive types instead of settling on a few that together capture that appropriate level of detail for your system

d)

Using key-value pairs instead of abstract data types

48.

You have a class that you keep adding to. Whenever you add new functionality, it just seems like the most natural place to put it, but it is starting to become a problem! Which code smell is this?

a)

Long Method

b)

Large Class

c)

Divergent Change

d)

Speculative generality

49.

Why is it important to avoid message chains whenever possible?

a)

They lower cohesion in your class

b)

The resulting code is usually rigid and complex

c)

It's a workaround to get to private methods, which are important for encapsulation

d)

If an unexpected object is returned, this could easily lead to runtime errors

50.

Since his app does not have that feature yet, Deck has only one subclass, RegularDeck. What code smell is this?

a)

Divergent Change

b)

Refused Bequest

c)

Primitive Obsession

d)

Speculative Generality

51.

Mohsin needs to create various user objects for his University learning platform. What is the act of creating an object called?

a)

object invocation

b)

object realization

c)

concrete instantiation

d)

class creation

52.

What is the difference between the Factory Method and a Simple Factory?

a)

In Factory Method, concrete instantiation is done in a designated method, where a Simply Factory creates objects for external clients

b)

A simple factory instantiates only one kind of object.

c)

In the factory method pattern, the factory itself must be instantiated before it starts creating objects. This is usually done with a dedicated method

d)

Simple factories cannot be subclassed

53.

José wants to build behaviours by stacking objects and calling their behaviours with an interface. When he makes a call on this interface, the stack of objects all perform their functions in order, and the exact combination of behaviours he needs depends what objects he stacked and in which order. Which Design Pattern best fits this need?

a)

Factory Method Pattern

b)

Singleton Pattern

c)

Composite Pattern

d)

Decorator Pattern

54.

You need to connect to a third-party library, but you think it might change later, so you want to keep the connection loosely coupled by having your object call a consistent interface. Which Design Pattern do you need?

a)

Proxy

b)

Facade

c)

Adapter

d)

Decorator

55.

Which of these design principles best describes the Proxy pattern?

a)

encapsulation, because the Proxy hides some of the detail of the subject

b)

separation of concerns, because the Proxy object has different concerns from the subject

c)

generalization, because a proxy is a general version of the real subject

d)

decomposition, because the Proxy object has different concerns than the subject

56.

Ashley has a method in her class that needs to makes a request. This request could be handled by one of several handlers. Which design pattern does she need?

a)

Facade

b)

Decorator

c)

Chain of Responsibility

57.

Which of these is NOT a good use of the Command pattern?

a)

Sending a command to a third-party service or library

b)

Supporting undo/redo queues of commands

c)

Building a user-interface that can be used to perform operations

d)

Building macros, for example in an image manipulation program

58.

Which code smell may become a problem with the Mediator design pattern?

a)

Inappropriate Intimacy

b)

Speculative Generality

c)

Refused Bequest

d)

Large Class

59.

Which of these methods is found in a typical Observer class?

a)

notify()

b)

addObserver()

c)

getState()

d)

update()

60.

In the MVC Pattern, which of these is usually made into an Observer?

a)

Model

b)

Back-End

c)

View

d)

Controller

61.

Which of these answers does NOT accurately complete the following sentence? “A class is considered closed to modification when…

a)

...all the attributes and behaviours are encapsulated

b)

...its collaborators are fixed

c)

...it is tested to be functioning properly

d)

...it is proven to be stable within your system

62.

How does the Dependency Inversion Principle improve your software systems?

a)

Client classes become dependent on low-level concrete classes, rather than dependant on high-level generalizations

b)

Dependency becomes inverted by having the system depend on the client classes

c)

Client classes become dependent on high level generalizations rather than dependant on low level concrete classes

d)

Client classes use an adapter to facilitate communication between itself and the rest of the system

63.

Allison has a search algorithm, and she would like to try a different implementation of it in her software. She tries replacing it everywhere it is used and this is a huge task! Which design principle could Allison have used to avoid this situation?

a)

Don't Repeat Yourself

b)

Composing Objects Principle

c)

Principle of Least Knowledge

d)

Dependency Inversion

64.

Which object-oriented design principle do Long Message Chains, a code smell, usually violate?

a)

Cohesion

b)

Separation of Concerns

c)

Open/Closed Principle

d)

Principle of Least Knowledge / Law of Demeter

65.

What are the components of the MVC pattern?

a)

Model, View, Command

b)

Model, View, Controller

c)

Member, Vision, Controller

d)

Model, Vision, Command

66.

Interface Segregation is a good way to avoid which code smell? Choose the best possible answer.

a)

Switch Statements

b)

Refused Bequest

c)

Divergent Change

d)

Long Method

67.

Read the following statements. Which of them are true? 1. Project managers are stakeholders in the architecture 2. End users are stakeholders in the architecture

a)

Both statements are true

b)

Only the first statement is true

c)

Neither statement is true

d)

Only the second statement is true

68.

Which of these UML diagrams might be useful for the logical view of a system? Select the 2 correct answers.

a)

Deployment diagram

b)

Class diagram

c)

Sequence diagram

d)

State diagram

69.

You need to show how your software elements are mapped to hardware nodes and execution environments. Which view do you need?

a)

development view

b)

physical view

c)

scenario

d)

process view

70.

What is the name for a physical result of the development process, such as an executable file?

a)

package

b)

leaf

c)

artifact

d)

node

71.

What does the component of ‘component diagram’ refer to?

a)

the basic parts of the software, which it could not run without

b)

an independent, encapsulated unit in the system

c)

an external part of the software system, like a library that must be imported

d)

a general name for a "part" of the software system. It could be a method, variable, class, object, or grouping of any of these

72.

Guidelines such as "the system should be easy and intuitive to learn", "the system should minimize user errors," and "the system should make it easy for users to complete tasks" fall under which category of quality attribute?

a)

usability

b)

intuitiveness

c)

astonishment

d)

complexity

73.

Calum is leading a team of developers and would like to promote conceptual integrity. Which of these is NOT a way he could promote conceptual integrity:

a)

Split the development team into subteams for each component of the architecture

b)

Do regular code reviews with the development team

c)

Establish conventions, such as structural rules or naming conventions

d)

Adopt good documentation practices

74.

Who are the three main groups of people involved in the architecture tradeoff analysis method?

a)

clients, designers, stakeholders

b)

peers, outsiders, designers

c)

evaluation team, outsiders, project team

d)

evaluation team, project decision makers, architecture stakeholders

75.

Leon is analyzing the architecture and notices that under conditions of high numbers of users signing on at the same time, there is a potential that one of the architecturally significant requirements (ASRs) will not be met. What is this called?

a)

tradeoff

b)

risk scenario

c)

utility shortfall

d)

non-risk scenario

76.

Maddie's software team is split into two subteams working on two different components that work together. These teams share one large room and are in constant contact. According to Conway's Law, what could happen if Maddie does not physically separate the two subteams?

a)

The component interfaces will not be reusable

b)

They will not leave sufficient comments, thinking that the other team already knows the relevant details

c)

Their components will repeat code unnecessarily

d)

The components they produce will be very tightly coupled

77.

Which of these is NOT a typical advantage of developing a product line?

a)

greatly reduced up-front development

b)

overall cost reduction

c)

consistency over the product line

d)

reducing time-to-market of later products

78.

Andy is planning the development of a product line of eBook readers and he has to categorize the components that will be handled by each team. There is one product in the line which has a backlight for reading during the night. In the development process, where would you categorize this feature?

a)

Product-Specific

b)

Commonality

c)

Variation

d)

One-Off

79.

Which of these views show the functional design of the software, usually in the form of objects and the relationships between them?

a)

physical view

b)

process view

c)

development view

d)

logical view

80.

To which view would the Package Diagram belong? Remember that a package diagram shows the packages that make up a software and how they are related.

a)

process view

b)

logical view

c)

development view

d)

physical view

81.

Which of these statements about Component Diagrams is true?

a)

They are useful for clarifying the artifacts that will be produced from development

b)

They clarify dependency relationships

c)

They give a dynamic view of the system

d)

They do not show third-party libraries

82.

Which of these will you NOT find in a deployment diagram?

a)

component

b)

device

c)

class

d)

artifact

e)

library

83.

What is an artifact?

a)

A physical realization of a software component

b)

A part of a device that is nonetheless important to depict on the deployment diagram, like a hard drive

c)

An unintended effect that the software has on the device.

d)

Part of the development process that is important to the developers, but not the end-users

84.

What is an abstract data type?

a)

A data schema that is defined by the developer

b)

A data type that dynamically allows the storage of different primitives

c)

An interface that defines how to store data in a class

d)

A data type that is not actually storing data; instead, it is used to define interfaces

85.

Select the one accurate statement about layered architecture:

a)

Passthrough should be avoided at all costs

b)

Enforcing communication only between adjacent layers and within a layer is key to good, layered architecture

c)

Upper layers act as service providers to lower layers

d)

Layered architecture is often based on layers of abstraction

86.

What is the correct term for a machine that hosts a server?

a)

server-tier

b)

Called by type: e.g. print server or media server

c)

server-host

d)

server-machine

87.

Some programs allow users to record a sequence of inputs - for example keyboard and mouse inputs - to run later. What are these called?

a)

user recorders

b)

scripts

c)

macros

d)

input listeners

88.

Data Flow Architecture is also called...

a)

Data Transformation Architecture

b)

Pipe and Filter Architecture

c)

Cascade Architecture

d)

Black Box Architecture

89.

Which of these is NOT a common component of event-driven architectures?

a)

event generator

b)

event processor

c)

event consumer

d)

event bus

90.

Which of these is a drawback of n-Tier architecture?

a)

Every tier demands extra resources to manage the client/server relationships

b)

More hardware nodes are necessary

c)

Only asynchronous messaging is possible, leading to challenging development decisions

d)

Limited in scale

91.

Which of these is NOT an example of Interpreter type architecture?

a)

Excel formulas

b)

Java Virtual Machine

c)

Scripting and Macros

d)

The kernel of an operating system

92.

Which of these terms matches this definition: “The amount of time the system is operational over a set period of time?”

a)

availability

b)

interoperability

c)

usability

d)

performance

93.

Which of these quality attributes is most important from the developer's perspective?

a)

availability

b)

security

c)

usability

d)

flexibility

94.

General quality attributes like performance and security have more specific components like throughput and latency for performance. What are these called?

a)

architecturally significant requirements

b)

sensitivity points

c)

attribute refinement

d)

architecture specifications

95.

Which strategy is NOT part of delivering a high-quality system?

a)

Treat all quality attributes as equally important

b)

Involve all stakeholders in design

c)

Adopt good documentation practices

d)

Set rules for design and implementation

96.

True or False: You should focus on situations that are outside the normal execution path when building a quality attribute scenario.

a)

True

b)

False

97.

"Maintenance Downtime" is an attribute refinement of what quality attribute?

a)

Performance

b)

Conceptual Integrity

c)

Maintainability

d)

Availability

98.

Eliza is planning a product line of media boxes. Some of these will connect to traditional television lines, whereas others will only have internet media like video-streaming services. What is this type of difference between products called?

a)

Extension

b)

Variation

c)

Product-Specifics

d)

Adaptation

99.

Which type of process control that we discussed is typically needed for complex systems?

a)

Feedforward Control + Feedback Control

b)

Feedforward Control

c)

MAPE-K

d)

Machine Learning

100.

Which of these is NOT shown on an activity diagram?

a)

activities

b)

interfaces

c)

decisions

d)

concurrency

101.

Which of these sets of keywords might be used on the lines in package diagrams?

a)

deploy, merge, include

b)

request, import, merge

c)

interface, export, load

d)

merge, access, import

102.

Select the two elements of the open/closed principle:

a)

Open for modification

b)

Closed for extension

c)

Open for maintenance

d)

Open for extension

e)

Closed for modification

103.

What is an abstract data type?

a)

a type of data defined by the developer rather than the language

b)

a data-centric class

c)

variables that are assigned a type (i.e. integer, double) but does not yet have a value assigned

d)

a data type that cannot be used directly but must be implemented as an interface