Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Software Design Quiz

Total questions: 49

Worksheet time: 25mins

Name
Class
Date
1.

Which of these are desirable characteristics of a software design? (Choose three)

a)

reusability

b)

flexible

c)

tight coupling

d)

maintainability

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)

Object

d)

Class

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 exposed some of them to other classes. Which OOP concept best describes this?

a)

decomposition

b)

encapsulation

c)

generalization

d)

abstraction

10.

Which keywords allow your classes to achieve polymorphism in Java? (Choose two)

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.

Which relationship 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 which OOP principle?

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 is called:

a)

Deadlock

b)

Transition lock

c)

Mutual lock

d)

State lock

17.

You create an object that represents a user and stores 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 with buttons and text fields. What kind of object is this?

a)

entity

b)

display

c)

interaction

d)

control

e)

boundary

19.

You create an object that compares values and updates one of them. 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 deadlines can be met

b)

Limiting features knowing they can be added later

c)

Adding security knowing it will reduce speed

d)

Adding preferences for switching features

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 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 OOP?

a)

Split developers into teams

b)

Separate data and methods

c)

Ensure classes are only concerned with their own data

d)

Separate objects or components according to their role

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 abstract methods

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

b)

To show different modes of the program

c)

To show all processes

d)

To show class relationships

30.

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 but do not yet have a value

d)

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

31.

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

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

32.

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 superclass method

b)

the subclass passes a parameter to determine which object is created

c)

the subclass defines the methods for concrete instantiation

33.

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

34.

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

a)

information proxy

b)

virtual proxy

c)

remote proxy

d)

protection proxy

35.

How does a Decorator Pattern work?

a)

adding features to a class with a new class

b)

expands methods with inheritance

c)

encapsulates a class to give a different interface

d)

builds behaviour by stacking objects

36.

What object types are used in the Composite Pattern? (Choose 2)

a)

root

b)

trunk

c)

composite

d)

branch

e)

leaf

37.

What is the correct situation for using Chain of Responsibility?

a)

multiple objects contribute to one response

b)

multiple potential handlers, but only one handles the request

c)

pass a message to multiple receivers

d)

delegate tasks to a hierarchy

38.

What design principles does the Command Pattern use?

a)

Encapsulation, generalization, loose coupling

b)

Encapsulation, generalization, information hiding

c)

Encapsulation, information hiding, loose coupling

d)

Generalization, information hiding, loose coupling

39.

When are you most likely to need a Mediator pattern?

a)

to de-couple a requester and provider

b)

when one of several handlers may handle a request

c)

when connecting two different interfaces

d)

when coordinating activities of related classes

40.

Which pattern fits a fixed sequence of steps with varying implementations?

a)

Template pattern

b)

Mediator pattern

c)

Command pattern

d)

State pattern

41.

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

42.

Which pattern arranges interacting machine components and sensors?

a)

Template

b)

Command

c)

Mediator

d)

Chain of Responsibility

43.

Which pattern models different modes (normal, lockdown, open)?

a)

Template

b)

Mediator

c)

State

d)

Observer

44.

Mailbox notifies owner when new mail arrives. Which pattern?

a)

State

b)

Observer

c)

Command

d)

Mediator

45.

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

46.

Best description of Dependency Inversion Principle:

a)

Clients depend on an Adapter

b)

Clients depend on generalizations instead of concrete objects

c)

Services subscribe as Observers

d)

Clients depend on a service interface directing requests

47.

Composing Objects principle — which is true?

a)

The first statement is true

b)

The second statement is true

c)

Neither is true

d)

Both are true

48.

How can comments be a code smell?

a)

Too many comments increase compile size

b)

Explaining design rationale

c)

Excessive comments can hide bad code

d)

They can’t be a code smell

49.

What is Primitive Obsession?

a)

many low-level objects without OO principles

b)

overuse of primitive data types

c)

using many different primitive types

d)

using key-value pairs instead of ADTs