0% found this document useful (0 votes)
17 views6 pages

Correction of Final Software Practice

Uploaded by

Malak Oudardour
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Correction of Final Software Practice

Uploaded by

Malak Oudardour
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

Which design pattern ensures a class has only one instance?

a) Factory Method
b) Singleton
c) Prototype
d) Adapter

Answer: b
What is the primary disadvantage of the Observer pattern?
a) Increased code complexity
b) Reduced coupling between subject and observers
c) Linked updates that may not be necessary
d) Lack of scalability

Answer: c
Which structural pattern allows incompatible interfaces to work together?
a) Adapter
b) Composite
c) Bridge
d) Proxy

Answer: a
What type of design pattern is the Strategy pattern?
a) Creational
b) Structural
c) Behavioral
d) Dependency

Answer: c
In the Factory Method pattern, which component decides the type of object to
create?
a) Client
b) Subclass
c) Parent Class
d) Interface

Answer: b
Which of the following patterns is used to dynamically add responsibilities to
objects?
a) Proxy
b) Decorator
c) Composite
d) Chain of Responsibility

Answer: b
7.Which of the following is NOT a benefit of using explicit architecture?
a) Stakeholder communication
b) System analysis
c) Code optimization
d) Large-scale reuse

Answer: c
8.What is a drawback of using a layered architecture?
a) Increased performance
b) Difficult separation of layers
c) Lack of scalability
d) Inflexibility in design

Answer: b
When would you choose a client-server architecture?
a) To support real-time data updates
b) To allow offline operations
c) To handle high-variability in system load
d) To simplify component communication

Answer: c
What type of architectural pattern best supports multi-level security?
a) MVC
b) Layered Architecture
c) Client-Server
d) Event-Driven

Answer: b
In a transaction processing system, which is a primary feature?
a) Asynchronous user requests
b) Layered interfaces
c) Static component behaviour
d) Monolithic design

Answer: a
Which property is enhanced by minimizing inter-component communications?
a) Maintainability
b) Performance
c) Security
d) Scalability

Answer: b
1. What is the primary goal of the Singleton pattern?
a) To create multiple instances
b) To allow dynamic behaviour
c) To ensure only one instance exists
d) To enable incompatible interfaces to work together

Answer: c

2. Which pattern is used to notify multiple objects about a state change?


a) Adapter
b) Observer
c) Strategy
d) Factory Method
Answer: b

3. What is the main benefit of using the Factory Method pattern?


a) Encapsulation of object creation
b) Dynamic addition of responsibilities
c) Simplified communication
d) Decoupled algorithms

Answer: a

1. What is the primary focus of architectural design?


a) Implementation details
b) Overall system structure
c) Testing procedures
d) User interface design

Answer: b

2. Which architectural pattern separates presentation from data?


a) Layered Architecture
b) Client-Server
c) MVC
d) Event-Driven

Answer: c

3. What is a disadvantage of the Client-Server architecture?


a) High scalability
b) Single point of failure
c) Centralized management
d) Modularity

Answer: b

Exercise 1: Identify the appropriate architectural pattern for the following


scenarios:
A system requiring multiple ways to display and interact with data.
An e-commerce platform that processes user requests.
A complex enterprise application requiring modular development.

Solutions:
MVC
Transaction Processing System
Layered Architecture

Exercise 2: Draw a component diagram for a library management system. Identify


components, interfaces, and relationships.

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-------------------------------------------------------

What is the main purpose of system modeling?


A) Programming the system
B) Developing abstract models to understand system functionality
C) Writing system documentation
D) Debugging the system
Answer: B

Which UML diagram shows system workflows or processes?


A) Use Case Diagram
B) Class Diagram
C) Activity Diagram
D) State Diagram
Answer: C
In a sequence diagram, what does a lifeline represent?
A) A user interaction
B) The state of an object
C) The life of an object or actor over time
D) A process flow
Answer: C

State diagrams are used to model:


A) Static relationships between classes
B) System reactions to external/internal events
C) System workflows
D) User interactions with the system
Answer: B

What does a diamond symbol signify in a UML diagram?


A) An actor
B) Aggregation or composition
C) A process start
D) An event
Answer: B

Which perspective focuses on the boundaries and environment of a system?


A) Structural
B) Behavioral
C) External
D) Interaction
Answer: C

What is the main advantage of using UML diagrams?


A) Code optimization
B) Improved communication and visualization
C) Faster deployment
D) Debugging tools
Answer: B

Which of the following UML diagrams shows system states and transitions?
A) Activity Diagram
B) Use Case Diagram
C) State Diagram
D) Class Diagram
Answer: C

A use case primarily:


A) Describes workflows of a system
B) Represents discrete system functionalities and actors
C) Shows object relationships
D) Displays event transitions
Answer: B

In a class diagram, what does a solid line between two classes represent?
A) Aggregation
B) Composition
C) Association
D) Inheritance
Answer: C

What does a rounded rectangle represent in an activity diagram?


A) State
B) Event
C) Process or activity
D) Transition
Answer: C

Which diagram type models system interactions over time?


A) Use Case Diagram
B) Sequence Diagram
C) State Diagram
D) Activity Diagram
Answer: B

12. What is the significance of context models?


A) Show how a system reacts to inputs
B) Illustrate system boundaries and external dependencies
C) Display class relationships
D) Highlight state changes
Answer: B

13. In an event-driven model, what triggers system behavior?


A) Static relationships
B) User input
C) External/internal events
D) Sequential data
Answer: C

14. Structural models are primarily used to show:


A) Data processes
B) System architecture and components
C) State transitions
D) User interactions
Answer: B

15. What do actors in a use case diagram represent?


A) System functionalities
B) External entities interacting with the system
C) Classes in the system
D) Events within the system
Answer: B

16. Which UML diagram type helps identify user requirements?


A) State Diagram
B) Use Case Diagram
C) Class Diagram
D) Activity Diagram
Answer: B

17. Which of the following diagrams focuses on component communication?


A) Sequence Diagram
B) Activity Diagram
C) Class Diagram
D) Context Diagram
Answer: A

18. What kind of models are data-driven systems based on?


A) Activity models
B) State machine models
C) Structural models
D) Event-driven models
Answer: A

19. What does state transition modeling focus on?


A) Workflow analysis
B) Behavior of systems in response to events
C) Data relationships
D) Communication flows
Answer: B

You might also like