Question

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

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer)

1) D - Factory Pattern

This is the kind of pattern which states that it has a defined interface or that of an abstract class meant for creating the object while let the subclass would decide as to which class would be instantiates and is responsible for an instance creation.

2) D - Adapter Pattern

When software engineering is considered then this is the software design pattern which helps in allowing the interface for a specific existing class being used with that of the other interface.

3) B - Model View Controller Pattern

The MVC is a kind of software design patern mostly being used for developing the user interface which would divide a specific related program logic as some of the interconnected element which would have a separate internal representative for a specific information from many information means to accept from and present it to that of the users.

4) B - Observer Pattern

There is this observe pattern which could be used as a software design pattern where the object referred as subject would maintain the list of dependents referred as observers would notify those in an automatic manner, by calling one of its methods.

Please comment if you need any other inputs.
Share a like if you find the answer helpful. This would help us learn and share our learning better.
Thank you.

Add a comment
Know the answer?
Add Answer to:
Identify the most applicable design pattern for the given scenario. Assume you are writing a program...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • please help!! hoose a Tool to Design Your Wireframes You may use any tool available to...

    please help!! hoose a Tool to Design Your Wireframes You may use any tool available to you that will allow you to create simple skeletal sketches of each screen or page, and to label the location of the key elements described in Part B of the assignment. You should save the sketches in one of the following formats: docx, .pptx, .sketch, .psd, .pdf, .png, .jpg, .gif, .png, or .rtf. Possible tools include Paint, PowerPoint, Word, Adobe Illustrator, Visual Studio, Visio,...

  • 50. Client-centeredness and humility might look like saying, "Tell me about what's most important to you...

    50. Client-centeredness and humility might look like saying, "Tell me about what's most important to you here." True False 51. Appropriate regression means introducing new tasks weekly. True False 52. Rewarding behaviors, not outcomes means focusing on measurements first. True False 53. A demonstration of your client's mental skills include: Going to the farmer's market, Following the "inner compass" Learning about protein All of the above are correct 54. During step 1 of the coaching process, aim to identify bright...

  • ask back to top Background You are a manager in the audit division at Miller Yates...

    ask back to top Background You are a manager in the audit division at Miller Yates Howarth (MYH), an accounting firm with offices throughout the major regional centres of NSW and Queensland. Although a medium sized firm by national standards, MYH is the second largest regional accounting firm in Australia. Most of MYH’s audit clients are in the agriculture, mining, manufacturing and property industries. All those industries are currently under pressure, either from a downturn in commodity prices or fierce...

  • second attempt. need asap please 2-4 sentences summarizing the article 4 interesting quotes from the article...

    second attempt. need asap please 2-4 sentences summarizing the article 4 interesting quotes from the article and 4 points explaining each quote In the first few years of the new millennium, at the height of the boom in the offshore call-center business, Tata Consultancy Services, the Indian technology-services giant, made the counterintuitive decision to divest its call-center operations. Why? Because although outsourced call centers were a fast-growing piece of its current business, TCS’s leadership had come to believe that they...

  • First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below...

    First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below Include each of the following in your answer (if applicable – explain in a paragraph) Research problem: what do you want to solve using Delphi? Sample: who will participate and why? (answer in 5 -10 sentences) Round one questionnaire: include 5 hypothetical questions you would like to ask Discuss: what are possible outcomes of the findings from your study? Hint: this is the conclusion....

  • How can we assess whether a project is a success or a failure? This case presents...

    How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...

  • 10. The Beck & Watson article is a Group of answer choices quantitative study qualitative study...

    10. The Beck & Watson article is a Group of answer choices quantitative study qualitative study 11. Beck & Watson examined participants' experiences and perceptions using what type of research design? Group of answer choices particpant obersvation phenomenology 12. Select the participants in the Beck & Watson study Group of answer choices Caucasian women with 2-4 children Caucasian pregnant women 13. In the Beck & Watson study, data was collected via a(n) Group of answer choices internet study focus group...

  • 14. Select the number of participants in the Beck & Watson study Group of answer choices...

    14. Select the number of participants in the Beck & Watson study Group of answer choices 8 13 22 35 15. Beck & Watson determined their final sample size via Group of answer choices coding saturation triangulation ethnography 16.Through their study, Beck & Watson determined Group of answer choices after a traumatic birth, subsequent births have no troubling effects after a traumatic birth, subsequent births brought fear, terror, anxiety, and dread Subsequent Childbirth After a Previous Traumatic Birth Beck, Cheryl...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT