Question: Question 1 (10 points) Instructions: Each question poses a software application. You must identify which design pattern best fits each application's needs.(Match the following): Question

Question 1 (10 points)

Instructions: Each question poses a software application. You must identify which design pattern best fits each application's needs.(Match the following):

Question 1:

a)

Decorator Pattern

b)

Factory Method Pattern

c)

Singleton Pattern

d)

Mediator Pattern

e)

Builder Pattern

f)

Bridge Pattern

g)

Faade Pattern

h)

State Pattern

i)

Chain of Responsibility Pattern

j)

Strategy Pattern

1.

A fast-food restaurant is implementing a "meal deal" application. The customer selects a main item, a side item, and a drink. When the customer places the order, the system takes the order and passes instructions to have each item cooked, wrapped, and bagged as needed.

2.

The same fast-food restaurant has an application for cooking burgers. Different burgers are cooked and assembled differently before being wrapped and boxed in similar fashion.

3.

The President of the college is a role that can only ever have one person assigned and there can only ever be one President at a time.

4.

A sensor sits on the ledge of a window at home. When the outside light level drops, the sensor flips a switch that, in turn, causes a light to turn on.

5.

You are eating at an ice cream parlour where you can order a sundae and get three scoops of ice cream in a dish. You then add whatever toppings you want.

6.

You are writing an application to implement a self-help service for students taking different courses at college. While the answers change from course to course and program to program, the questions do not change, so you decide to design the application with a single point of entry for everyone.

7.

Your ATM application for the bank checks who the user is, then which account they want and what type of transaction they are performing, and whether or not that transaction is possible.

8.

You are implementing a new algorithm to manage traffic lights at a very busy intersection. The algorithm manages which cars can go and when each car can take a turn safely and efficiently.

9.

You are writing an application to check the weather and to check a user's schedule. When the weather is nice and the user must go out, the application tells the user to have a nice day. When the user is ready to go out and the weather is turning rainy, the application tells the user to stop, change out of their suede shoes, and so forth.

10.

You have an application to pick a restaurant based on whether you are eating alone, with a friend, with a spouse, or maybe with a boss or client.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!