Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz2-SoftDesign-MakScie

Total questions: 40

Worksheet time: 40mins

Name
Class
Date
1.

In a sequence diagram, a lifeline represents:

a)

A sequence of operations

b)

A role or object in the interaction

c)

A control flow between activities

d)

A state of an object

2.

The dashed vertical line in a sequence diagram is called:

a)

Activity flow

b)

Lifeline

c)

Execution specification

d)

Interaction fragment

3.

A synchronous message in a sequence diagram is usually represented by:

a)

Solid line with open arrowhead

b)

Solid line with filled arrowhead

c)

Dashed line with open arrowhead

d)

Dashed line with filled arrowhead

4.

What does an activation box (execution specification) denote?

a)

Object destruction

b)

Time during which an object is active

c)

Object creation

d)

Relationship between objects

5.

Which message type shows object destruction?

a)

Lost message

b)

Found message

c)

Delete message

d)

Return message

6.

Combined fragments in sequence diagrams are used for:

a)

Representing class relationships

b)

Representing alternative flows

c)

Representing object state transitions

d)

Representing inheritance

7.

The return message in a sequence diagram is usually shown with:

a)

Solid line with filled arrowhead

b)

Dashed line with open arrowhead

c)

Dashed line with filled arrowhead

d)

Solid line with open arrowhead

8.

Which UML element is NOT used in a sequence diagram?

a)

Lifeline

b)

Actor

c)

State node

d)

Activation box

9.

Which diagram best complements sequence diagrams for describing system structure?

a)

Class diagram

b)

Activity diagram

c)

State diagram

d)

Use case diagram

10.

In UML, an asynchronous message is represented by:

a)

Solid line with open arrowhead

b)

Solid line with filled arrowhead

c)

Dashed line with open arrowhead

d)

Dashed line with filled arrowhead

11.

In an activity diagram, an activity represents:

a)

A state of an object

b)

A function or process

c)

A class method

d)

A data attribute

12.

The diamond symbol in activity diagrams denotes:

a)

Activity start

b)

Activity end

c)

Decision or merge

d)

Synchronization

13.

The thick horizontal bar in activity diagrams represents:

a)

Object destruction

b)

Synchronization (fork/join)

c)

Message passing

d)

Use case boundary

14.

The black filled circle in an activity diagram denotes:

a)

Decision

b)

Initial node

c)

Final node

d)

Object flow

15.

The bullseye-like circle (circle inside another circle) indicates:

a)

Decision node

b)

Activity completion

c)

Final node

d)

Object destruction

16.

Object nodes in activity diagrams are used to represent:

a)

Object lifelines

b)

Objects consumed or produced by activities

c)

Messages exchanged

d)

Classes and attributes

17.

Swimlanes in activity diagrams are used to:

a)

Show sequential execution

b)

Show responsibility of actors or departments

c)

Show object relationships

d)

Show return messages

18.

Which element is NOT part of activity diagrams?

a)

Lifeline

b)

Decision node

c)

Fork

d)

Join

19.

Which is true about activity diagrams?

a)

They model time sequence

b)

They model control and object flow

c)

They model object state changes only

d)

They model system architecture

20.

Guard conditions in activity diagrams are written:

a)

In curly braces { }

b)

In square brackets [ ]

c)

In parentheses ( )

d)

With double quotes " "

21.

In state diagrams, states are represented as:

a)

Circles

b)

Rectangles with rounded corners

c)

Diamonds

d)

Ovals

22.

A transition between states is labeled with:

a)

Action only

b)

Event [guard] / action

c)

Only guard condition

d)

Class name

23.

The black filled circle in a state diagram represents:

a)

Final state

b)

Decision node

c)

Initial state

d)

Choice pseudo-state

24.

A bullseye-like symbol (circle inside another circle) in state diagrams indicates:

a)

Initial state

b)

Final state

c)

Composite state

d)

Choice

25.

Entry and exit actions in states are used to:

a)

Show concurrent activities

b)

Show actions performed on entering and leaving a state

c)

Show object destruction

d)

Show decision flows

26.

Composite states are used to:

a)

Represent inheritance

b)

Represent nested sub-states within a state

c)

Represent object creation

d)

Represent parallel classes

27.

History states in UML allow:

a)

Returning to the initial state only

b)

Remembering the last active sub-state

c)

Preventing state transitions

d)

Forcing all transitions to reset

28.

Self-transition in a state diagram means:

a)

Transition from one object to another

b)

State exits and re-enters itself

c)

State is destroyed

d)

Object is deleted

29.

Which of the following is NOT part of state diagrams?

a)

States

b)

Transitions

c)

Guards

d)

Swimlanes

30.

State diagrams are most useful for modeling:

a)

Dynamic behavior of objects

b)

Class inheritance

c)

Data flow

d)

Database schemas

31.

The "S" in SOLID stands for:

a)

Single State Responsibility

b)

Single Responsibility Principle

c)

Standard Responsibility Principle

d)

Simplified Responsibility Principle

32.

Which principle ensures that software entities should be open for extension but closed for modification?

a)

Liskov Substitution Principle

b)

Interface Segregation Principle

c)

Open/Closed Principle

d)

Dependency Inversion Principle

33.

Which Python feature best supports the Liskov Substitution Principle?

a)

Function overloading

b)

Inheritance and polymorphism

c)

Data encapsulation

d)

List comprehensions

34.

Which principle is violated if a class has too many unrelated methods?

a)

Single Responsibility Principle

b)

Interface Segregation Principle

c)

Open/Closed Principle

d)

Dependency Inversion Principle

35.

In Python, abstract base classes (ABC) help implement which SOLID principle?

a)

Dependency Inversion

b)

Liskov Substitution

c)

Interface Segregation

d)

Open/Closed

36.

The Dependency Inversion Principle suggests:

a)

High-level modules should not depend on low-level modules directly

b)

Low-level modules should be deleted

c)

Classes should depend only on concrete implementations

d)

Dependencies should be avoided completely

37.

If a subclass overrides a parent method but breaks expected behavior, it violates:

a)

Dependency Inversion

b)

Liskov Substitution

c)

Interface Segregation

d)

Open/Closed

38.

Which of the following supports Dependency Inversion in Python?

a)

Direct object instantiation inside classes

b)

Using dependency injection via constructors or setters

c)

Using only built-in modules

d)

Hardcoding dependencies

39.

Splitting large interfaces into smaller, more specific ones aligns with:

a)

Interface Segregation Principle

b)

Open/Closed Principle

c)

Single Responsibility Principle

d)

Liskov Substitution Principle

40.

Applying SOLID principles in Python helps primarily to:

a)

Increase code complexity

b)

Make code rigid and less reusable

c)

Improve maintainability and scalability

d)

Eliminate the need for testing