wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Architecture

Total questions: 13

Worksheet time: 9mins

Name
Class
Date
1.

Layered Architecture requires

(select one)

a)

Groups of classes that call one another in the same direction (without cycles)

b)

Packaging layers in separate modules

c)

Having 3 layers

(eg Controller, Service, Repository)

d)

Equal distribution of complexity between layers

e)

Each layer to have its own data structures

2.

These are valid examples of layers

(select one)

a)

order, shipment, customer

b)

controller, service, repository

c)

offers, corporate offers, batch runner

3.

Relaxed Layer Architecture ...

(select one)

a)

Allows a layer to call back into the caller layer

b)

Allows defining more than 3 layers

c)

Allows to skip layers,

if calling in the same direction

d)

Allows a layer to use the data structures of another layer

4.

An Application Service (Facade Design Pattern):

(select ⚠️three)

a)

Orchestrates a flow

(eg. a use-case)

b)

Is decoupled from other components

c)

Should be stripped of heavy logic

d)

Allows orchestrated components to be less coupled to each other

5.

Clean Architecture goals

(select ⚠️two)

a)

Keep Domain logic agnostic to DB, UI, and External APIs

b)

Simplify unit-testing of Domain Logic

c)

Use fewer interfaces

d)

Align Domain Model

with API model (DTO)

6.

Responsibilities of an Adapter

(select ⚠️two)

a)

Orchestrate a Use Case

b)

Implement Business Logic

c)

Call an unfriendly API

d)

Convert data Domain <=> DTO of External API

7.

A Value Object should ...

(select ⚠️two)

a)

Be Immutable

b)

Be typically small

c)

Have persistent identity (eg PK)

d)

NOT contain logic

e)

Have a single field

8.

In the classic Hexagonal Architecture (aka Ports-and-Adapters), the Use Cases...

(select one)

a)

are accessed via secondary(output) ports

b)

are isolated from Entities via Adapters

c)

access the outside APIs via secondary(output) ports

d)

talk to the database directly

9.

In the classic Onion Architecture, the following dependency is NOT allowed:
(select one)

a)

Application → Infra

b)

Infra → Domain

c)

Persistence → Domain

d)

Application → Domain

10.

In an Onion Architecture, a use-case optimized query (eg. a search):

(select one)

a)

Must always go through the Domain

b)

Allows changing data directly in the DB

c)

Requires a dedicated Read DB updated via events

d)

Selects the minimum necessary data from DB for performance reasons

11.

Vertical Slice Architecture means ...

(select one)

a)

Grouping code by UseCase, not by Layer

b)

Developing software driven by .feature files

c)

Separating code in Modules, by functional area

d)

Writing the entire implementation of a feature in a single file (eg. *UseCase)

12.

What does the term "cohesion" refer to in software engineering ?

a)

The degree to which a module or component focuses on performing a single, well-defined task

b)

The process of combining multiple software components into a single program.

c)

The practice of ensuring that code is easy to understand by using proper indentation and naming conventions.

d)

The measure of how closely a software system matches its requirements

13.

What does the term "coupling" refer to?

a)

The practice of grouping related functions or methods within a single class or module

b)

The process of connecting external devices to a computer system

c)

The degree to which a component is independent of other components

d)

The measure of how well a software system handles errors and exceptions