1|Page
SOEN 341 EXAM TEST BANK 2025 | ALL EXAM
QUESTIONS AND CORRECT ANSWERS | ALREADY
GRADED A+ | VERIFIED ANSWERS | LATEST VERSION
(ALL THAT IS NEEDED IN ONE DOCUMENT)
Types of design patterns and explain each - (ANSWER)Creational: Abstracts the
object instantiationProcess
Structural: Abstracts how classes and objects are composed to build larger
structures
Behavioural: Abstracts algorithms and assignment of responsibility among objects
Explain Observer - (ANSWER)Name: Observer (aka: Publish-Subscribe)
Problem description: Use when multiple presentations of an object's state are
needed
Solution description: Separates presentation of object state from the object itself
Name 3 structural patterns - (ANSWER)Adapter, composite, decorator
Explain Adapter - (ANSWER)Name:
,2|Page
Adapter (aka: Wrapper)
Problem description:
Use when a class' interface doesn't match
with the hierarchy that we want to use
Solution description:
Inject a class to adapt the interface to the
expectation
Explain overriding - (ANSWER)Allows subclasses to redefine
methods that superclasses have
already defined or declared
Explain interfaces - (ANSWER)Defines the methods that a class will
respond to
Can be declared in a .java file
Explain abstract class - (ANSWER)Can declare methods without
providing an implementation
,3|Page
Can define methods as well
Cannot be instantiated directly
Name creational patterns - (ANSWER)Abstract factory, Factory method
Explain factory method - (ANSWER)Name:
Factory Method (aka: Virtual Constructor)
Problem description:
Use when a class cannot anticipate the
objects it must create
Solution description:
Defers the responsibility of creating objects
to subclasses that know what to create
Explain abstract factory - (ANSWER)Name:
Abstract Factory (aka: Kit)
Problem description:
Use when your system must be configured
, 4|Page
with one of multiple families of objects
Solution description:
Creates abstractions that hide the
configuration details of the object families
Explain composite - (ANSWER)Name:
Composite
Problem description:
Use to allow clients to treat individual
objects and collections of them identically
Solution description:
Use an abstraction to hide the fact that an
object is an aggregate of several objects
Example: arithmetic tree
Explain decorator - (ANSWER)Name:
Decorator
SOEN 341 EXAM TEST BANK 2025 | ALL EXAM
QUESTIONS AND CORRECT ANSWERS | ALREADY
GRADED A+ | VERIFIED ANSWERS | LATEST VERSION
(ALL THAT IS NEEDED IN ONE DOCUMENT)
Types of design patterns and explain each - (ANSWER)Creational: Abstracts the
object instantiationProcess
Structural: Abstracts how classes and objects are composed to build larger
structures
Behavioural: Abstracts algorithms and assignment of responsibility among objects
Explain Observer - (ANSWER)Name: Observer (aka: Publish-Subscribe)
Problem description: Use when multiple presentations of an object's state are
needed
Solution description: Separates presentation of object state from the object itself
Name 3 structural patterns - (ANSWER)Adapter, composite, decorator
Explain Adapter - (ANSWER)Name:
,2|Page
Adapter (aka: Wrapper)
Problem description:
Use when a class' interface doesn't match
with the hierarchy that we want to use
Solution description:
Inject a class to adapt the interface to the
expectation
Explain overriding - (ANSWER)Allows subclasses to redefine
methods that superclasses have
already defined or declared
Explain interfaces - (ANSWER)Defines the methods that a class will
respond to
Can be declared in a .java file
Explain abstract class - (ANSWER)Can declare methods without
providing an implementation
,3|Page
Can define methods as well
Cannot be instantiated directly
Name creational patterns - (ANSWER)Abstract factory, Factory method
Explain factory method - (ANSWER)Name:
Factory Method (aka: Virtual Constructor)
Problem description:
Use when a class cannot anticipate the
objects it must create
Solution description:
Defers the responsibility of creating objects
to subclasses that know what to create
Explain abstract factory - (ANSWER)Name:
Abstract Factory (aka: Kit)
Problem description:
Use when your system must be configured
, 4|Page
with one of multiple families of objects
Solution description:
Creates abstractions that hide the
configuration details of the object families
Explain composite - (ANSWER)Name:
Composite
Problem description:
Use to allow clients to treat individual
objects and collections of them identically
Solution description:
Use an abstraction to hide the fact that an
object is an aggregate of several objects
Example: arithmetic tree
Explain decorator - (ANSWER)Name:
Decorator