WorksheetsSAAD 8
Total questions: 81
Worksheet time: 41mins
Name
Class
Date
1.
In the Design Overview (1) slide, which pair is presented as core design artifacts (as opposed to analysis artifacts)?
a)
Design classes and subsystems
b)
Use cases and analysis classes
c)
Actors and scenarios
d)
User stories and test cases
e)
Requirements and constraints
2.
Which statement best matches the slide definition of design in this course?
a)
Identifying design elements with detailed specifications and technical choices so they can be converted into source code during implementation
b)
Writing source code directly from requirements without intermediate models
c)
Collecting stakeholder needs and validating them with prototypes
d)
Producing only user interface mockups and screen flows
e)
Optimizing runtime performance after deployment
3.
According to the slide, why are subsystems defined with explicit interfaces?
a)
To hide internal structure, simplify design, and enable independent development
b)
To ensure every module shares the same database schema
c)
To force all classes to inherit from a common base class
d)
To guarantee that all methods are public for testing
e)
To eliminate the need for packaging and grouping
4.
The slide states that mapping from analysis classes to design elements is many-to-many. Which situation is consistent with that claim?
a)
One analysis class is realized by multiple design elements, and multiple analysis classes may be merged into one design element
b)
Each analysis class maps to exactly one design class and never changes after analysis
c)
Only boundary classes map to design elements; control and entity classes are ignored
d)
Design elements can only be created after implementation has started
e)
Interfaces can only map to boundary classes, not to controls or entities
5.
When applying the slide mapping idea, which outcome is explicitly allowed?
a)
A single design element consolidates responsibilities from multiple analysis classes
b)
A boundary analysis class must always become a single UI widget class
c)
An entity analysis class must always become a database table one-to-one
d)
A control analysis class must always be split into separate database procedures
e)
An interface must always be replaced by a proxy in every interaction
6.
In the MVC example on the slide, a boundary analysis class can map to which design elements?
a)
Both Controller and View classes in the application layer
b)
Only Model classes in the persistence layer
c)
Only Entity classes in the domain layer
d)
Only database triggers and stored procedures
e)
Only a single design class with no UI involvement
7.
In the same MVC mapping example, a control analysis class can map to which combination?
a)
The Controller class and other design (business) classes
b)
Only the View class and template files
c)
Only the Model class and data access objects
d)
Only boundary classes because control logic is removed
e)
Only subsystems because controllers are prohibited
8.
In the Login example diagram, which mapping best reflects how the analysis boundary LoginForm is refined in design?
a)
LoginForm responsibilities split into LoginView (UI state and actions) and LoginController (request handling)
b)
LoginForm becomes Account because it owns username and password fields
c)
LoginForm becomes a subsystem interface because it has a login() operation
d)
LoginForm is eliminated; the user sends messages directly to Account
e)
LoginForm is merged into Bootstrap so the controller is unnecessary
9.
Which attribute is shown as belonging to LoginView in the design diagram?
a)
errorMsg : string
b)
lookup(un)
c)
doLogin(un, pw)
d)
initialize()
e)
createStatement()
10.
The slide states that interactions between analysis objects in a use case must be converted during design. What must be preserved during this conversion?
a)
The responsibilities of the analysis classes
b)
The exact programming language syntax used in implementation
c)
The physical database indexes and partitions
d)
The original user interface color scheme
e)
The exact network protocol headers of external calls
11.
According to the slide, what is being transformed from analysis to design in a use-case realization?
a)
Interactions between analysis class objects become interactions between design objects
b)
Static class attributes become runtime logs and traces
c)
Database records become UI widgets automatically
d)
Unit tests become user stories without modification
e)
Subsystem interfaces become entity classes by default
12.
In the login sequence example, which object sends the message lookup(un)?
a)
LoginController
b)
LoginForm
c)
The user actor
d)
Account
e)
An external router
13.
In the same sequence, which pair of outcomes is associated with the two alt fragments?
a)
Success shows user homepage; fail shows error message
b)
Success shows error message; fail shows user homepage
c)
Success repeats lookup(un); fail repeats doLogin(username, password)
d)
Success creates Account; fail deletes Account
e)
Success bypasses LoginForm; fail bypasses LoginController
14.
In the detailed design-object login sequence, which condition triggers the 'Re-login' behavior?
a)
h(pw) != user.hash
b)
h(pw) == user.hash
c)
user = lookup(un) returns null
d)
index() returns false
e)
router receives URL /logout
15.
In this design sequence, which component handles URL routing to invoke index() on the controller?
a)
router
b)
LoginView
c)
Account
d)
UserHomepage
e)
ResultSet
16.
The slide states that design elements are grouped into packages of logical architecture. What is a key motivation for packaging mentioned earlier in the deck?
a)
Grouping design elements that are tightly coupled together
b)
Ensuring every class depends directly on every other class for reuse
c)
Forcing all classes into a single package to simplify builds
d)
Eliminating interfaces to reduce the number of files
e)
Replacing subsystems with global variables for faster access
17.
According to the slide, how are logical architectures typically formed and evolved during design?
a)
They start from a basic framework (often from architectural patterns) and are updated and refined during design
b)
They are finalized during requirements and must not change afterward
c)
They are derived solely from database schemas and ER diagrams
d)
They are chosen after implementation to match the code that already exists
e)
They are replaced by use cases once the UI is implemented
18.
In the MVC package example, which set of framework base classes is shown under CodeIgniter?
a)
CI_View, CI_Controller, and CI_Model
b)
Bootstrap.Input, Bootstrap.Button, and Bootstrap.Grid
c)
DriverManager, Connection, and Statement
d)
Menu, MenuItem, and Command
e)
Schedule, Student, and CourseOffering
19.
In the same example, which LoginController operations are shown with public visibility (marked with +)?
a)
index() and doLogin(un, pw)
b)
showUserHome() and showError(msg)
c)
lookup(un) and initialize()
d)
show() and submit()
e)
getConnection(url, user, pass) and createStatement()
20.
Which set of named design principles is listed on the slide?
a)
SOLID, DRY, KISS, and YAGNI
b)
CAP, BASE, ACID, and PACELC
c)
SCRUM, XP, Kanban, and SAFe
d)
RAID, RTO, RPO, and SLA
e)
FIFO, LIFO, LRU, and LFU
21.
Within SOLID as listed on the slide, which principle is stated as: upper layers should not depend directly on lower layers?
a)
Dependency Inversion
b)
Interface Segregation
c)
Open/Close
d)
Single Responsibility
e)
Liskov Substitution
22.
The slide notes that a controller class can accumulate many responsibilities from a boundary class. What is the recommended design response?
a)
Split the controller into as many classes as possible so each responds to one or closely related responsibilities
b)
Merge the boundary into the controller so all responsibilities are in one place
c)
Move all controller responsibilities into entity classes to reduce layers
d)
Replace the controller with a single subsystem interface with no implementation
e)
Duplicate controller logic across views to avoid coordination
23.
In the example given on the slide, which responsibility should be separated from the Order class to satisfy single responsibility?
a)
Calculating the discount or rebate value
b)
Managing order details
c)
Storing order identifiers
d)
Tracking order line items
e)
Maintaining the order status
24.
The Open/Close principle on the slide is phrased as open for extension but closed for change. Which technique is explicitly suggested to support extension?
a)
Use inheritance to extend rather than modifying the designed class
b)
Hard-code all output targets so behavior is fixed
c)
Combine unrelated responsibilities into one method to reduce files
d)
Expose all fields publicly so extensions can patch state directly
e)
Disable polymorphism to prevent varying behavior
25.
The slide gives an example of printing object information. Which redesign best aligns with Open/Close as described?
a)
Output object information to an output channel provided as a parameter
b)
Write a method that always prints to the screen and never accepts parameters
c)
Inline the printing logic into every caller to avoid dependencies
d)
Store printed strings in a global variable so other code can reuse them
e)
Remove the printing capability so the class is smaller
26.
In the Liskov substitution example, why can Square inheriting from Rectangle lead to incorrect behavior?
a)
Square overrides setHeight or setWidth so that setting one dimension changes both, violating the parent behavior that expects independent updates
b)
Square cannot be drawn at all because it has fewer methods than Rectangle
c)
Rectangle forbids inheritance, so any child class is invalid by definition
d)
Square must store more fields than Rectangle, increasing memory use
e)
Square requires an interface rather than a class hierarchy for compilation
27.
According to the slide, what kind of design mistake commonly causes Liskov substitution violations?
a)
Overriding a parent method with an incompatible version in the child class
b)
Using too many small interfaces instead of one large interface
c)
Grouping tightly coupled elements into the same package
d)
Replacing an interface with a proxy even when no responsibility transfer is needed
e)
Creating a subsystem for every entity class
28.
What action does the Interface Segregation principle prescribe on the slide?
a)
Divide a large interface into many small interfaces corresponding to different purposes
b)
Merge small interfaces into one large interface to reduce indirection
c)
Replace interfaces with abstract classes in all layers
d)
Expose subsystem internals so clients can optimize calls
e)
Eliminate interfaces entirely to simplify compilation
29.
Which interface design most closely follows the Interface Segregation principle as stated?
a)
Separate interfaces for distinct purposes rather than one catch-all interface
b)
One interface containing every method used anywhere in the system
c)
A single interface that forces all clients to implement unused operations
d)
An interface that mixes UI rendering, persistence, and networking methods
e)
An interface that only contains constants and no operations
30.
According to the Dependency Inversion slide, which dependency direction should be avoided?
a)
Upper layers depending directly on lower layers
b)
Lower layers depending on upper layers through interfaces
c)
Detailed layers depending on abstractions
d)
Layers communicating through interfaces
e)
Abstract layers not depending on detailed layers
31.
The slide states that layers should communicate with each other through what mechanism?
a)
Interfaces
b)
Global variables
c)
Direct database table access from the UI
d)
Hard-coded concrete class references only
e)
Copy-pasted code blocks across layers
32.
The subsystem slide describes a subsystem as a closed package. What is the intended meaning of closed in this context?
a)
Internal details are hidden and only functions exposed through an interface are visible to clients
b)
The subsystem cannot be replaced once deployed
c)
The subsystem contains no internal classes, only interfaces
d)
The subsystem is compiled into a single file with no dependencies
e)
The subsystem rejects all external calls to increase security
33.
In the subsystem UML depiction, what is the relationship between a subsystem interface and the subsystem implementation?
a)
The subsystem realizes the interface
b)
The interface inherits from the subsystem
c)
The subsystem is aggregated by the interface
d)
The interface is composed by the subsystem client
e)
The subsystem depends on the interface only through global state
34.
Which property is explicitly listed as a benefit of dividing a system into subsystems?
a)
Independently installed, tested, and delivered parts
b)
Guaranteed elimination of all integration defects
c)
Automatic creation of database schemas from interfaces
d)
Removal of the need for any design documentation
e)
Forcing every subsystem to share the same source repository
35.
The slide states that in a component-oriented system, subsystems can be converted or compiled into what?
a)
Components
b)
Use cases
c)
Actors
d)
Class stereotypes
e)
Sequence diagrams
36.
The slide lists cases where analysis classes can be mapped to subsystems. Which mapping is explicitly described as business services?
a)
Control classes representing a group of business rules
b)
Entity classes representing data storage only
c)
Boundary classes with passive partners such as devices
d)
Utility functions and libraries
e)
Specific data types and data structures
37.
According to the slide, which scenario best matches a boundary class with passive partners?
a)
A boundary class that interacts with an external system or device
b)
A boundary class that encapsulates core business rules
c)
A boundary class that replaces all interfaces with inheritance
d)
A boundary class that stores persistent data in entity objects only
e)
A boundary class that implements JDBC CRUD operations
38.
In the mapping diagram, ClassA accesses Subsystem K through what construct?
a)
An interface that exposes operations such as Y() and Z()
b)
A direct reference to Subsystem K internal classes
c)
A global variable shared by all subsystems
d)
A database trigger that forwards calls
e)
A user interface form that owns the subsystem
39.
What design motivation is most consistent with mapping a complex analysis class to a subsystem behind an interface?
a)
Reducing design-model complexity by encapsulating complex behavior in a closed package
b)
Increasing coupling so changes propagate quickly across modules
c)
Avoiding any need to define responsibilities
d)
Ensuring all messages bypass the interface to reach internal objects
e)
Eliminating reuse by making behavior application-specific
40.
In the proxy class example, which element is labeled with the stereotype subsystem proxy?
a)
A proxy class that represents CourseCatalogSystem to clients
b)
The ICourseCatalogSystem interface itself
c)
The Student entity class
d)
The Schedule entity class
e)
The DriverManager class
41.
Which operation signature is shown on ICourseCatalogSystem in the proxy example?
a)
getCourseOfferings(forSemester : Semester, forStudent : Student) : CourseOfferingList
b)
submitBill(forTuition : Double, forStudent : Student)
c)
executeQuery(sql : String) : ResultSet
d)
Clicked() : void
e)
createStatement() : Statement
42.
In the structural mapping slide, which operation is provided by IBillingSystem?
a)
submitBill(forTuition : Double, forStudent : Student)
b)
getCourseOfferings(forSemester : Semester, forStudent : Student) : CourseOfferingList
c)
initialize()
d)
read(searchCriteria : String) : PersistentClassList
e)
Process()
43.
In the same slide, which subsystem interface includes both getCourseOfferings(...) and initialize()?
a)
ICourseCatalogSystem
b)
IBillingSystem
c)
IRegistrationController
d)
IStudentSchedule
e)
IPersistentClass
44.
In the registration structural diagram, what maximum numbers of primary and alternate course offerings are indicated for a schedule?
a)
Up to 4 primary courses and up to 2 alternate courses
b)
Up to 2 primary courses and up to 4 alternate courses
c)
Up to 4 primary courses and unlimited alternate courses
d)
Unlimited primary courses and up to 2 alternate courses
e)
Exactly 4 primary courses and exactly 2 alternate courses in all cases
45.
Based on the responsibilities listed in the diagram, which design element is responsible for obtaining course offerings?
a)
RegistrationController
b)
Student
c)
Schedule
d)
CourseOffering
e)
RegisterForCoursesForm
46.
In the interactive model sequence, which call represents the external system request to fetch course offerings for a semester?
a)
get course offerings(forSemester)
b)
display course offerings()
c)
create schedule()
d)
display blank schedule()
e)
add schedule(Schedule)
47.
According to the note in the sequence, what occurs after add schedule(Schedule) is executed?
a)
The Submit Schedule subflow is executed
b)
The system deletes the currentSchedule from Student
c)
The controller bypasses the form and calls the database directly
d)
All alternate offerings are replaced with primary offerings
e)
The subsystem interface is removed from the design model
48.
In the revised interactive model, which change is emphasized relative to calling the external CourseCatalogSystem directly?
a)
Calls go to ICourseCatalogSystem (an interface) instead of the concrete external system object
b)
The form calls CourseOffering objects directly without a controller
c)
The student actor calls Schedule.new() without any boundary object
d)
The controller replaces all messages with database triggers
e)
The sequence removes getCourseOfferings entirely
49.
In the interface-based sequence, which message name is shown as the concrete operation on the subsystem interface?
a)
getCourseOfferings(Semester)
b)
submitBill(Double, Student)
c)
initialize(url, user, pass)
d)
createScheduleWithOfferings()
e)
executeQuery(string)
50.
The slide states that if an analysis class must transfer responsibility to a class outside the subsystem, what should be used instead of an interface?
a)
A proxy
b)
An abstract class
c)
A database view
d)
A package import
e)
A singleton global object
51.
In the illustration comparing Interface vs Proxy, which configuration is shown as allowing Message 2 to be validly sent to Object B?
a)
Object A -> Proxy -> Object B
b)
Object A -> Interface -> Object B
c)
Object B -> Interface -> Object A
d)
Object A -> Object B with no intermediary
e)
Object A -> ResultSet -> Object B
52.
When a use-case interaction chain between objects becomes too complex, what refactoring does the slide suggest?
a)
Encapsulate part of the interaction chain inside a subsystem
b)
Inline all method calls into a single boundary class
c)
Replace all objects with a single global data structure
d)
Remove interfaces so messages can be sent directly
e)
Duplicate the interaction chain in multiple packages to simplify tracing
53.
Which trigger condition is explicitly mentioned as a reason to encapsulate interactions into a subsystem?
a)
The interaction between objects in a use case is too complex
b)
The system has no need for reuse
c)
All interfaces are already small and purpose-specific
d)
The database schema is fixed and cannot be changed
e)
The UI contains no forms or boundary classes
54.
The slide lists characteristics of interaction chains suitable for encapsulation into a subsystem. Which characteristic is explicitly included?
a)
Clear inputs and results
b)
No inputs and no outputs
c)
Tightly coupled to a specific UI widget
d)
Requires changing many unrelated classes per use case
e)
Depends on copying code into multiple layers
55.
Which benefit is explicitly called out for encapsulating part of a complex interaction chain in a subsystem?
a)
Potential for reuse
b)
Guaranteed elimination of all polymorphism
c)
Removal of the need for interfaces
d)
Automatic generation of ER diagrams
e)
Prevention of any future extension
56.
The slide motivates design patterns by listing recurring design problems. Which problem is explicitly listed?
a)
Repetition in design
b)
Lack of network bandwidth
c)
Insufficient disk capacity
d)
Inability to compile source code
e)
Absence of a database server
57.
According to the slide, design patterns are introduced primarily as a solution to what overarching need?
a)
Reuse of design solutions for similar problems to address repetition and complexity
b)
Replacement of use cases with code stubs
c)
Elimination of all subsystems in favor of monoliths
d)
Avoidance of any optimization considerations
e)
Conversion of UML diagrams into SQL automatically
58.
The slide classifies the classic set of 23 design patterns into which three groups?
a)
Creational, Structural, Behavioral
b)
Functional, Relational, Transactional
c)
Synchronous, Asynchronous, Reactive
d)
Client, Server, Peer-to-peer
e)
Compile-time, Run-time, Deploy-time
59.
Which technology-specific design-pattern example is explicitly listed on the slide?
a)
Accessing data on a relational database using JDBC
b)
Caching results using LRU replacement
c)
Distributed consensus using Paxos
d)
Event streaming using Kafka
e)
Indexing text using TF-IDF
60.
The slide describes design patterns as parameterized collaboration models. In this framing, what do the parameters represent?
a)
Elements that change according to the application context
b)
The invariant elements that never participate in collaborations
c)
Only the programming language keywords used in implementation
d)
Only the database connection strings used at runtime
e)
Only the user interface labels displayed on screens
61.
According to the slide, a pattern collaboration model can be expressed in which two aspects?
a)
Structure and behavior
b)
Cost and schedule
c)
Latency and throughput
d)
Security and privacy
e)
Code style and formatting
62.
In the Command Pattern collaboration diagram, which role is responsible for invoking Process() on a Command?
a)
Invoker
b)
Client
c)
ConcreteCommand
d)
PersistentClass
e)
ResultSet
63.
In the same Command Pattern diagram, which element defines the Process() operation that ConcreteCommand implements?
a)
Command
b)
Client
c)
Invoker
d)
MenuItem
e)
DriverManager
64.
In the Command Pattern class structure shown, what is the association cardinality between Menu and MenuItem?
a)
A Menu has 0..* MenuItem entries
b)
A Menu has exactly 1 MenuItem entry
c)
A Menu has 1..2 MenuItem entries
d)
A MenuItem owns 0..* Menu objects
e)
Menu and MenuItem have no association in the pattern
65.
In the same diagram, what does MenuItem.Clicked() delegate to?
a)
cmd.Process()
b)
menu.AddItem(...)
c)
DriverManager.getConnection(...)
d)
ResultSet.getString()
e)
Schedule.addStudent()
66.
In the Command Pattern initialization sequence, which step creates the OpenCommand instance?
a)
OpenCommand()
b)
AddItem("Open...", ocmd)
c)
MenuItem("Open...", ocmd)
d)
Clicked()
e)
DoOpen()
67.
In the user-interaction sequence for the Open menu item, what is the immediate message sent after Clicked()?
a)
Process()
b)
AddItem("Open...", ocmd)
c)
OpenCommand()
d)
getConnection(url, user, pass)
e)
executeQuery(string)
68.
In the Command Pattern class diagram with method visibility, which Application methods are shown as private (marked with -)?
a)
AskUser() and DoOpen()
b)
OpenCommand() and Process()
c)
AddItem(...) and MenuItem(...)
d)
Clicked() and Process()
e)
getData() and setData()
69.
According to the shown MenuItem constructor logic, what assignments occur when MenuItem(s, c) is constructed?
a)
cmd = c and label = s
b)
label = c and cmd = s
c)
cmd.Process() is executed immediately
d)
AskUser() is called before storing label
e)
DoOpen() is invoked to validate the label
70.
In the RDBMS:JDBC mechanism diagram, which DBClass operation is defined to return a list of persistent objects?
a)
read(searchCriteria : String) : PersistentClassList
b)
create() : PersistentClass
c)
update(c : PersistentClass)
d)
delete(c : PersistentClass)
e)
command()
71.
Which Statement operation in the diagram returns a ResultSet?
a)
executeQuery(sql : String) : ResultSet
b)
executeUpdate(sql : String) : int
c)
createStatement() : Statement
d)
getConnection(url, user, pass) : Connection
e)
getString() : String
72.
In the RDBMS:JDBC initialize sequence, which object requests the database connection?
a)
DBClass
b)
DriverManager
c)
Connection
d)
Statement
e)
ResultSet
73.
In that same initialize sequence, which argument list is passed to getConnection?
a)
url, user, pass
b)
sql, user, pass
c)
url, semester, student
d)
searchCriteria, user, pass
e)
label, cmd, menu
74.
In the RDBMS:JDBC create sequence, which operation occurs immediately after Connection.createStatement()?
a)
Statement.executeUpdate(String)
b)
Statement.executeQuery(String)
c)
ResultSet.getString()
d)
PersistentClassList.add(PersistentClass)
e)
DriverManager.getConnection(url, user, pass)
75.
In the same create sequence, which object supplies the data used to build the SQL statement?
a)
PersistentClass via getData()
b)
Statement via executeUpdate(String)
c)
DriverManager via getConnection(url, user, pass)
d)
ResultSet via getString()
e)
PersistentClassList via add(PersistentClass)
76.
In the RDBMS:JDBC read sequence, why is a PersistentClassList created?
a)
To hold all retrieved data to be returned to the client
b)
To replace the ResultSet so SQL is not needed
c)
To cache the database connection across programs
d)
To store only SQL statements for later replay
e)
To enforce that only one record can be returned
77.
The read sequence notes repeated operations for each element returned from executeQuery(). Which operation is explicitly shown as repeated for each returned element?
a)
add(PersistentClass) to the PersistentClassList
b)
getConnection(url, user, pass) on DriverManager
c)
OpenCommand() construction
d)
submitBill(forTuition, forStudent)
e)
index() on LoginController
78.
In the RDBMS:JDBC update sequence, which action occurs before executing the SQL update statement?
a)
Getting data from PersistentClass and creating a Statement
b)
Executing executeQuery(string) to retrieve a ResultSet
c)
Creating a PersistentClassList to store updated rows
d)
Calling MenuItem.Clicked() to trigger the update
e)
Routing URL /login to index()
79.
Which JDBC-style Statement operation is used in the update sequence to execute the SQL statement?
a)
executeUpdate(string)
b)
executeQuery(string)
c)
getString()
d)
create()
e)
add(PersistentClass)
80.
In the RDBMS:JDBC delete sequence shown, which call sequence matches the slide?
a)
delete(PersistentClass) then createStatement() then executeUpdate(string)
b)
delete(PersistentClass) then executeQuery(string) then getString()
c)
delete(PersistentClass) then new() then add(PersistentClass)
d)
delete(PersistentClass) then Clicked() then Process()
e)
delete(PersistentClass) then initialize() then getCourseOfferings(...)
81.
According to the delete sequence, which operation is used to execute the SQL statement?
a)
executeUpdate(string)
b)
executeQuery(string)
c)
getConnection(url, user, pass)
d)
getString()
e)
createStatement() : ResultSet
100 %
