Identify the most applicable design pattern for the given scenario. Assume you are writing a program…

Identify the most applicable design pattern for the given
scenario.
Assume you are writing a program to respond to many different
types of web requests. You determine that there are 5 steps for
handling the request which need to be done in order:
1. Set up server memory
2. Process the URL
3. Handle web form parameters
4. Generate the content of the web page
5. Send the page back to the user.
You quickly realize that Steps 1, 2, and 5 are generic and
happen the same way for every request, but Steps 3 and 4 will be
different, depending on the request that is made.
a.- Observer Pattern
b.- Template Pattern
c.- Strategy Pattern
d.- Factory Pattern
Identify the most applicable design pattern for the given
scenario.
You are writing a program that will be using multiple libraries
created by others to interact with different databases. Each
library does similar behavior but each has its own unique software
interface. You want to create a common interface for your program
without having to change the libraries you received from other
people.
a.- Model View Controller Pattern
b.- Strategy Pattern
c.- Singleton Pattern
d.- Adapter Pattern
Identify the most applicable design pattern for the given
scenario.
You are working on an application to track daily exercise and
eating, and then compute calories burned, etc.
There will be a fairly involved UI component with charts and
buttons to click on to enter data, but also a fairly complex set of
classes that handle the interaction among all the classes for
exercise and nutrition.
You decide that you want to keep UI concerns separate from the
exercise and nutrition rules and complexities.
a.- Strategy Pattern
b.- Model View Controller Pattern
c.- Template Pattern
d.- Iterator Pattern
Identify the most applicable design pattern for the given
scenario.
In your application, you have users preferences that are
accessed and updated from different classes at different points
throughout the program.
You decide to create a class to manage the user preferences, but
would prefer not to have to pass around an instance of it to all
the different classes that will need access to it.
a.- Model View Controller Pattern
b.- Observer Pattern
c.- Adapter Pattern
d.- Singleton Pattern