PURDUE CS 307 MIDTERM STUDY GUIDE QUESTIONS AND
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
What is abstraction-occurrence pattern? - CORRECT ANSWERS Context: Domain model
contain sets of related objects.
P: Find best way to represent.
Force: Avoid duplication
S: Create Abstraction and Occurrence classes that contain data common to members.
*One-to-many*
(e.g. Abstraction: TVSeries, Occurrence, Episode)
What is general hierarchy pattern? - CORRECT ANSWERS Context: Objects form
hierarchy.
Problem: Represent hierarchy with limits.
Force: Objects may have common properties.
S: Create Node class, SuperiorNode, and NonSuperiorNode.
What are aggregations? How are they represented in UML? - CORRECT ANSWERS
Special associations representing "part-whole". Whole is referred to as aggregate. Denoted by a
diamond
(e.g. Vehicle <>-- VehiclePart)
What is player-role pattern? - CORRECT ANSWERS Context: An object has a particular
set of properties (*role*).
P: Ability to change role.
,PURDUE CS 307 MIDTERM STUDY GUIDE QUESTIONS AND
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
Force: Improve encapsulation, avoid multiple inheritance.
S: Create a Player class, create an association to AbstractRole (which has varying sub classes).
What is the singleton pattern? - CORRECT ANSWERS Context: Classes for which only
one instance should exist.
P: Ensure it is impossible to make more.
Force: Public construction cannot guarantee this.
S; Private class variable that stores the only instance. Public method getInstance()
What is the delegation pattern? - CORRECT ANSWERS Context: Two classes, one
provides service and other desires it.
P: Make use of method in another class.
F: Inheritance not appropriate.
S: Create Delegator class with method that calls another method in Delegate.
(e.g. Delegator: Stack, Delegate: LinkedList...
push() --> list.addFirst())
What is the immutable pattern? - CORRECT ANSWERS Context: Object that contains a
state which never changes after creation.
P: Creating immutable instance.
F: No loophole.
S: No setters, all modifications done in constructor.
,PURDUE CS 307 MIDTERM STUDY GUIDE QUESTIONS AND
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
What is a fork? - CORRECT ANSWERS In an activity diagram, when there is one
incoming transition and multiple outgoing ones.
What is a join? - CORRECT ANSWERS Multiple incoming transitions, one outgoing.
What is a rendezvous? - CORRECT ANSWERS Multiple incoming and multiple outgoing
transition.
What are swim lanes? - CORRECT ANSWERS Partition activities among classes.
What is an architectural pattern? - CORRECT ANSWERS Like software, there are
architectural patterns with context, problem, solution.
What is the multilayer pattern? - CORRECT ANSWERS "Stack of boxes"
Problem: System needs to be built and tested independently.
Solution: Define layers and allow relation among them.
Separate Layer for UI, general services at bottom.
What is the architectural problem and solution for Client Server? - CORRECT ANSWERS
Problem: Large number of clients need access to resources.
Solution: Client components initiate interactions and wait on results.
Bad design:
Increase re-usability
, PURDUE CS 307 MIDTERM STUDY GUIDE QUESTIONS AND
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
Obsolescence
What is the Transaction-processing pattern? - CORRECT ANSWERS P: System must read
and handle series of inputs that change data.
S: Dispatcher component that decides how to handle each transaction, calling another
component
Bad design:
Increase re-usability
Obsolescence
Portability
Testability
Abstraction
What is pipe-and-filter pattern? - CORRECT ANSWERS Stream of data is sent through
pipes, with modifications in some way. All components could be removed & replaced.
Bad design:
Obsolescence
Portability
What is Model-View-Controller? - CORRECT ANSWERS P: UI needs frequent
modifications without impacting system.
S: Break system into 3 parts.
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
What is abstraction-occurrence pattern? - CORRECT ANSWERS Context: Domain model
contain sets of related objects.
P: Find best way to represent.
Force: Avoid duplication
S: Create Abstraction and Occurrence classes that contain data common to members.
*One-to-many*
(e.g. Abstraction: TVSeries, Occurrence, Episode)
What is general hierarchy pattern? - CORRECT ANSWERS Context: Objects form
hierarchy.
Problem: Represent hierarchy with limits.
Force: Objects may have common properties.
S: Create Node class, SuperiorNode, and NonSuperiorNode.
What are aggregations? How are they represented in UML? - CORRECT ANSWERS
Special associations representing "part-whole". Whole is referred to as aggregate. Denoted by a
diamond
(e.g. Vehicle <>-- VehiclePart)
What is player-role pattern? - CORRECT ANSWERS Context: An object has a particular
set of properties (*role*).
P: Ability to change role.
,PURDUE CS 307 MIDTERM STUDY GUIDE QUESTIONS AND
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
Force: Improve encapsulation, avoid multiple inheritance.
S: Create a Player class, create an association to AbstractRole (which has varying sub classes).
What is the singleton pattern? - CORRECT ANSWERS Context: Classes for which only
one instance should exist.
P: Ensure it is impossible to make more.
Force: Public construction cannot guarantee this.
S; Private class variable that stores the only instance. Public method getInstance()
What is the delegation pattern? - CORRECT ANSWERS Context: Two classes, one
provides service and other desires it.
P: Make use of method in another class.
F: Inheritance not appropriate.
S: Create Delegator class with method that calls another method in Delegate.
(e.g. Delegator: Stack, Delegate: LinkedList...
push() --> list.addFirst())
What is the immutable pattern? - CORRECT ANSWERS Context: Object that contains a
state which never changes after creation.
P: Creating immutable instance.
F: No loophole.
S: No setters, all modifications done in constructor.
,PURDUE CS 307 MIDTERM STUDY GUIDE QUESTIONS AND
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
What is a fork? - CORRECT ANSWERS In an activity diagram, when there is one
incoming transition and multiple outgoing ones.
What is a join? - CORRECT ANSWERS Multiple incoming transitions, one outgoing.
What is a rendezvous? - CORRECT ANSWERS Multiple incoming and multiple outgoing
transition.
What are swim lanes? - CORRECT ANSWERS Partition activities among classes.
What is an architectural pattern? - CORRECT ANSWERS Like software, there are
architectural patterns with context, problem, solution.
What is the multilayer pattern? - CORRECT ANSWERS "Stack of boxes"
Problem: System needs to be built and tested independently.
Solution: Define layers and allow relation among them.
Separate Layer for UI, general services at bottom.
What is the architectural problem and solution for Client Server? - CORRECT ANSWERS
Problem: Large number of clients need access to resources.
Solution: Client components initiate interactions and wait on results.
Bad design:
Increase re-usability
, PURDUE CS 307 MIDTERM STUDY GUIDE QUESTIONS AND
ANSWERS LATEST UPDATED 2025/2026 A COMPLETE EXAM
WITH CORRECT DETAILED ANSWERS BEST GRADED + FOR
SUCCESS
Obsolescence
What is the Transaction-processing pattern? - CORRECT ANSWERS P: System must read
and handle series of inputs that change data.
S: Dispatcher component that decides how to handle each transaction, calling another
component
Bad design:
Increase re-usability
Obsolescence
Portability
Testability
Abstraction
What is pipe-and-filter pattern? - CORRECT ANSWERS Stream of data is sent through
pipes, with modifications in some way. All components could be removed & replaced.
Bad design:
Obsolescence
Portability
What is Model-View-Controller? - CORRECT ANSWERS P: UI needs frequent
modifications without impacting system.
S: Break system into 3 parts.