







































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The PrepIQ 19SOFTA3 Software Design B Ultimate Exam focuses on object-oriented design, UML modeling, design patterns, software quality attributes, modularization, and maintainability principles. Detailed practice questions help learners strengthen architectural thinking and software design skills required for academic and professional software engineering environments.
Typology: Exams
1 / 47
This page cannot be seen from the preview
Don't miss anything!








































Question 1. Which design quality attribute focuses on the system’s ability to continue operating correctly in the presence of unexpected inputs or conditions? A) Portability B) Robustness C) Maintainability D) Correctness Answer: B Explanation: Robustness measures how well a system tolerates erroneous or unexpected inputs without failure. Question 2. In object-oriented design, which principle encourages hiding internal data representation from other objects? A) Abstraction B) Information Hiding C) Separation of Concerns D) Modularity Answer: B Explanation: Information Hiding protects internal data structures, exposing only necessary interfaces. Question 3. High cohesion in a module is desirable because it: A) Reduces the number of modules needed. B) Increases the amount of data shared between modules. C) Ensures the module performs a single, well-defined responsibility. D) Allows tighter coupling with other modules. Answer: C Explanation: High cohesion means a module’s elements are closely related, supporting a single purpose.
Question 4. Which UML relationship represents a whole-part connection where the part can exist independently of the whole? A) Composition B) Aggregation C) Inheritance D) Association Answer: B Explanation: Aggregation denotes a weak “has-a” relationship; the part may exist without the whole. Question 5. In a sequence diagram, the vertical line representing an object’s existence over time is called a: A) Activation bar B) Lifeline C) Message arrow D) Fragment box Answer: B Explanation: A lifeline shows the timeline for an object during the interaction. Question 6. Which architectural style is characterized by a series of processing elements where output of one element becomes input to the next? A) Layered Architecture B) Pipe-and-filter C) Client-Server D) Publish-Subscribe Answer: B Explanation: Pipe-and-filter architectures pass data through a chain of filters. Question 7. In MVC, which component is primarily responsible for handling user input and converting it into actions on the model?
C) Add responsibilities to objects dynamically. D) Control access to a resource. Answer: B Explanation: Adapter lets incompatible interfaces work together. Question 11. Which behavioral pattern encapsulates a request as an object, allowing parameterization of clients with different requests? A) Observer B) Strategy C) Command D) State Answer: C Explanation: Command turns a request into a stand-alone object. Question 12. Design-by-Contract uses which of the following to specify the obligations of a method? A) Preconditions only B) Postconditions only C) Invariants only D) Preconditions, postconditions, and invariants Answer: D Explanation: DbC defines all three to ensure method correctness. Question 13. In a component-connector view, connectors primarily represent: A. Data structures inside a component. B. Communication pathways between components. C. Physical deployment of modules. D. User interface elements. Answer: B
Explanation: Connectors model runtime interactions among components. Question 14. Which UML diagram best captures the possible states of an object and the events that cause state transitions? A) Activity Diagram B) Sequence Diagram C) State-Chart Diagram D) Class Diagram Answer: C Explanation: State-Chart diagrams model state-dependent behavior. Question 15. In a layered architecture, a “strict” layering rule states that: A) Components may call any other component. B) Only adjacent layers may communicate directly. C) All layers share a common database. D) Layers can be merged at runtime. Answer: B Explanation: Strict layering restricts communication to neighboring layers. Question 16. Which of the following is NOT a typical non-functional requirement that influences software design? A) Performance B) Usability C) Algorithmic complexity of a specific method D) Security Answer: C Explanation: Algorithmic complexity is a design detail, not a high-level non-functional requirement.
B) Separate concerns between data and presentation. C) Enable multiple inheritance. D) Cache results of expensive operations. Answer: A Explanation: Facade hides subsystem complexity behind a unified interface. Question 21. Which dynamic modeling diagram is best suited to illustrate parallel activities within a process? A) Sequence Diagram B) Activity Diagram C) Communication Diagram D) Deployment Diagram Answer: B Explanation: Activity diagrams can depict concurrent flows using fork/join nodes. Question 22. In a client-server architecture, the server is typically responsible for: A) Rendering user interfaces. B) Managing local storage on the client device. C) Providing services or resources to clients. D) Initiating all network connections. Answer: C Explanation: Servers host resources and respond to client requests. Question 23. Which of the following best describes the “information hiding” principle? A) Encapsulating data within a class and exposing only necessary methods. B. Using inheritance to share implementation details. C. Dividing a program into multiple threads.
D. Storing data in a global namespace. Answer: A Explanation: Information hiding limits external access to internal details. Question 24. In a state-chart diagram, a guard condition is: A) An action executed after a transition. B) A boolean expression that must be true for the transition to fire. C) The name of the destination state. D) A visual symbol for a final state. Answer: B Explanation: Guard conditions control whether a transition occurs. Question 25. Which architectural view focuses on mapping software components onto physical hardware resources? A) Module View B) Component-Connector View C) Allocation View D) Logical View Answer: C Explanation: The Allocation view addresses deployment onto hardware and organizational units. Question 26. The Observer pattern is most useful when: A) Objects need to be created without specifying concrete classes. B) One object must notify many dependent objects of state changes. C) An object must change its behavior at runtime. D) Multiple objects must share a single resource. Answer: B Explanation: Observer defines a one-to-many dependency for change notification.
A) Integration Testing B) System Testing C) Unit Testing D) Acceptance Testing Answer: C Explanation: Unit testing focuses on single components without external dependencies. Question 31. A formal technical review (FTR) differs from a walkthrough primarily in that an FTR: A) Is informal and optional. B) Requires a documented process and defect tracking. C) Involves only the author of the design. D) Does not produce any written output. Answer: B Explanation: FTRs are structured reviews with formal records and follow-up actions. Question 32. In a component-based design, an interface contract typically includes: A) Source code of the component. B) Only the component’s name. C) Method signatures, pre-conditions, and post-conditions. D) The physical location of the component’s binaries. Answer: C Explanation: Interface contracts define how callers may interact with the component. Question 33. The Proxy pattern is commonly used to: A) Extend the behavior of an object without subclassing. B) Provide a placeholder for another object to control access.
C) Convert one interface to another. D) Simplify a subsystem’s interface. Answer: B Explanation: Proxy controls or postpones access to the real subject. Question 34. Which of the following statements about cohesion is FALSE? A) High cohesion usually leads to easier maintenance. B) Low cohesion is desirable for reusable components. C) Cohesion measures the strength of relationships within a module. D) Functional cohesion is the strongest form of cohesion. Answer: B Explanation: Low cohesion indicates unrelated responsibilities and is undesirable. Question 35. In a layered architecture, which layer typically handles persistence (e.g., database access)? A) Presentation Layer B) Business Logic Layer C) Data Access Layer D) Application Layer Answer: C Explanation: The Data Access Layer abstracts storage mechanisms. Question 36. Which UML diagram would you use to model the static structure of a system, showing classes, interfaces, and their relationships? A) Sequence Diagram B) Class Diagram C) Activity Diagram D) Use-Case Diagram Answer: B
Question 40. Which of the following best describes a “guard” in a state-chart diagram? A) An action performed after entering a state. B) A condition that must be true for a transition to be taken. C) The label of a state. D) A visual marker for final states. Answer: B Explanation: Guards are boolean expressions controlling transition firing. Question 41. In object-oriented design, which of the following is a primary benefit of encapsulation? A) Increased code duplication. B) Reduced ability to change implementation details. C) Controlled access to an object’s internal state. D) Mandatory use of inheritance. Answer: C Explanation: Encapsulation protects internal state through controlled interfaces. Question 42. The Decorator pattern is primarily used to: A) Hide the implementation details of a class. B) Add responsibilities to objects dynamically without affecting other objects. C) Provide a single point of access to a subsystem. D) Ensure only one instance of a class exists. Answer: B Explanation: Decorator wraps objects to extend behavior at runtime. Question 43. Which of the following is a characteristic of a “tight” coupling relationship? A) Modules communicate through well-defined interfaces only.
B) Changes in one module rarely affect others. C) Modules share many internal data structures. D) Modules are independent and replaceable. Answer: C Explanation: Tight coupling means heavy interdependence, often via shared internals. Question 44. In a UML component diagram, the “provided” interface is depicted as: A) A lollipop symbol. B) A socket symbol. C) A rectangle with the «interface» stereotype. D) A dashed line. Answer: A Explanation: The lollipop denotes an interface that the component supplies. Question 45. Which of the following testing techniques examines the internal structure of the code? A) Black-box testing B) White-box testing C) Exploratory testing D) Acceptance testing Answer: B Explanation: White-box testing uses knowledge of code internals for test design. Question 46. In a layered architecture, a “relaxed” layering rule permits: A) Only vertical communication between adjacent layers. B) Direct access from any layer to any other layer. C) Horizontal communication within the same layer.
Explanation: Concurrency requirements affect architecture (e.g., threading, load balancing). Question 50. In a component-connector view, a “connector” typically represents: A) A class attribute. B) A communication channel such as a message queue or RPC link. C) The source code file location. D) The physical size of a component. Answer: B Explanation: Connectors model runtime interactions between components. Question 51. Which design pattern is best suited for creating complex objects step by step, allowing different representations? A) Builder B) Prototype C) Factory Method D) Abstract Factory Answer: A Explanation: Builder separates construction from representation, enabling incremental creation. Question 52. In UML, a «stereotype» is used to: A) Define a new kind of relationship. B) Extend the vocabulary of UML elements with additional semantics. C) Represent an object instance. D) Indicate a private attribute. Answer: B Explanation: Stereotypes add domain-specific meaning to model elements.
Question 53. Which of the following best describes “traceability” in design verification? A) Measuring code execution time. B) Mapping design artifacts back to their originating requirements. C) Counting the number of classes in a diagram. D) Tracking version control commits. Answer: B Explanation: Traceability ensures each design element satisfies a requirement. Question 54. In a peer-to-peer (P2P) system, each node typically acts as: A) Only a client. B) Only a server. C) Both client and server simultaneously. D) Neither; it only stores data. Answer: C Explanation: P2P nodes share resources and request services from each other. Question 55. Which of the following statements about the Factory Method pattern is TRUE? A) It creates objects by cloning existing instances. B) It defines an interface for creating an object but lets subclasses decide which class to instantiate. C) It ensures only one instance of a class exists. D) It hides the existence of a complex subsystem. Answer: B Explanation: Factory Method delegates object creation to subclasses. Question 56. In a UML deployment diagram, a node is represented as: A) A stick figure.
D) Object Diagram Answer: B Explanation: Sequence diagrams focus on temporal message ordering. Question 60. The Liskov Substitution Principle requires that: A) Subclasses must not add new methods. B) Objects of a superclass can be replaced with objects of a subclass without affecting program correctness. C) All classes must be abstract. D) Inheritance should be avoided. Answer: B Explanation: LSP ensures behavioral compatibility of subclasses. Question 61. Which design pattern is most appropriate for allowing an object to change its behavior when its internal state changes, without altering its class? A) Strategy B) State C) Command D) Observer Answer: B Explanation: The State pattern encapsulates state-specific behavior. Question 62. In a data-flow architecture, a “filter” typically: A) Stores data persistently. B) Transforms data as it passes through. C) Manages user authentication. D) Handles network routing. Answer: B Explanation: Filters process and transform streams of data.
Question 63. Which of the following is a primary goal of “information hiding”? A) To increase the number of public methods. B) To reduce the system’s ability to evolve. C) To limit the impact of changes to a module’s internal implementation. D) To expose all internal data structures for reuse. Answer: C Explanation: Hiding details isolates changes, improving maintainability. Question 64. In a UML class diagram, a dashed line with an open arrow denotes: A) Inheritance B) Association C) Dependency D) Realization Answer: C Explanation: Dependency is a using relationship shown with a dashed line and open arrow. Question 65. Which testing level is concerned with verifying that integrated components interact correctly according to their interfaces? A) Unit Testing B) Integration Testing C) System Testing D) Regression Testing Answer: B Explanation: Integration testing focuses on inter-component communication. Question 66. The “Strategy” pattern is most useful when: A) An object must be notified of changes in another object.