WorksheetsQuiz2-SoftDesign-MakScie
Total questions: 40
Worksheet time: 40mins
In a sequence diagram, a lifeline represents:
A sequence of operations
A role or object in the interaction
A control flow between activities
A state of an object
The dashed vertical line in a sequence diagram is called:
Activity flow
Lifeline
Execution specification
Interaction fragment
A synchronous message in a sequence diagram is usually represented by:
Solid line with open arrowhead
Solid line with filled arrowhead
Dashed line with open arrowhead
Dashed line with filled arrowhead
What does an activation box (execution specification) denote?
Object destruction
Time during which an object is active
Object creation
Relationship between objects
Which message type shows object destruction?
Lost message
Found message
Delete message
Return message
Combined fragments in sequence diagrams are used for:
Representing class relationships
Representing alternative flows
Representing object state transitions
Representing inheritance
The return message in a sequence diagram is usually shown with:
Solid line with filled arrowhead
Dashed line with open arrowhead
Dashed line with filled arrowhead
Solid line with open arrowhead
Which UML element is NOT used in a sequence diagram?
Lifeline
Actor
State node
Activation box
Which diagram best complements sequence diagrams for describing system structure?
Class diagram
Activity diagram
State diagram
Use case diagram
In UML, an asynchronous message is represented by:
Solid line with open arrowhead
Solid line with filled arrowhead
Dashed line with open arrowhead
Dashed line with filled arrowhead
In an activity diagram, an activity represents:
A state of an object
A function or process
A class method
A data attribute
The diamond symbol in activity diagrams denotes:
Activity start
Activity end
Decision or merge
Synchronization
The thick horizontal bar in activity diagrams represents:
Object destruction
Synchronization (fork/join)
Message passing
Use case boundary
The black filled circle in an activity diagram denotes:
Decision
Initial node
Final node
Object flow
The bullseye-like circle (circle inside another circle) indicates:
Decision node
Activity completion
Final node
Object destruction
Object nodes in activity diagrams are used to represent:
Object lifelines
Objects consumed or produced by activities
Messages exchanged
Classes and attributes
Swimlanes in activity diagrams are used to:
Show sequential execution
Show responsibility of actors or departments
Show object relationships
Show return messages
Which element is NOT part of activity diagrams?
Lifeline
Decision node
Fork
Join
Which is true about activity diagrams?
They model time sequence
They model control and object flow
They model object state changes only
They model system architecture
Guard conditions in activity diagrams are written:
In curly braces { }
In square brackets [ ]
In parentheses ( )
With double quotes " "
In state diagrams, states are represented as:
Circles
Rectangles with rounded corners
Diamonds
Ovals
A transition between states is labeled with:
Action only
Event [guard] / action
Only guard condition
Class name
The black filled circle in a state diagram represents:
Final state
Decision node
Initial state
Choice pseudo-state
A bullseye-like symbol (circle inside another circle) in state diagrams indicates:
Initial state
Final state
Composite state
Choice
Entry and exit actions in states are used to:
Show concurrent activities
Show actions performed on entering and leaving a state
Show object destruction
Show decision flows
Composite states are used to:
Represent inheritance
Represent nested sub-states within a state
Represent object creation
Represent parallel classes
History states in UML allow:
Returning to the initial state only
Remembering the last active sub-state
Preventing state transitions
Forcing all transitions to reset
Self-transition in a state diagram means:
Transition from one object to another
State exits and re-enters itself
State is destroyed
Object is deleted
Which of the following is NOT part of state diagrams?
States
Transitions
Guards
Swimlanes
State diagrams are most useful for modeling:
Dynamic behavior of objects
Class inheritance
Data flow
Database schemas
The "S" in SOLID stands for:
Single State Responsibility
Single Responsibility Principle
Standard Responsibility Principle
Simplified Responsibility Principle
Which principle ensures that software entities should be open for extension but closed for modification?
Liskov Substitution Principle
Interface Segregation Principle
Open/Closed Principle
Dependency Inversion Principle
Which Python feature best supports the Liskov Substitution Principle?
Function overloading
Inheritance and polymorphism
Data encapsulation
List comprehensions
Which principle is violated if a class has too many unrelated methods?
Single Responsibility Principle
Interface Segregation Principle
Open/Closed Principle
Dependency Inversion Principle
In Python, abstract base classes (ABC) help implement which SOLID principle?
Dependency Inversion
Liskov Substitution
Interface Segregation
Open/Closed
The Dependency Inversion Principle suggests:
High-level modules should not depend on low-level modules directly
Low-level modules should be deleted
Classes should depend only on concrete implementations
Dependencies should be avoided completely
If a subclass overrides a parent method but breaks expected behavior, it violates:
Dependency Inversion
Liskov Substitution
Interface Segregation
Open/Closed
Which of the following supports Dependency Inversion in Python?
Direct object instantiation inside classes
Using dependency injection via constructors or setters
Using only built-in modules
Hardcoding dependencies
Splitting large interfaces into smaller, more specific ones aligns with:
Interface Segregation Principle
Open/Closed Principle
Single Responsibility Principle
Liskov Substitution Principle
Applying SOLID principles in Python helps primarily to:
Increase code complexity
Make code rigid and less reusable
Improve maintainability and scalability
Eliminate the need for testing
