Consider an online mobile phone application in which customers can purchase smartphones, including iPhone and Samsung models. The software designer considers applying the Gang of Four (GoF) Factory Method pattern to enhance their design. Currently, there are classes including: SalesInterface, Sales Process (to process the sales), Customer, Phone, iPhone, Samsung and Payment, in their design model. Which of the following is a good design? Select one: a. A Factory class should be created to hide the Phone and Customer classes. b. A Factory class should be created to hide the SalesInterface and Customer classes. C. A Factory class should be created to hide the SalesInterface and Sales Process classes. d. A Factory class should be created to hide the Phone, iPhone and Samsung classes.
Consider an online mobile phone application in which customers can purchase smartphones, including iPhone and Samsung models. The software designer considers applying the Gang of Four (GoF) Factory Method pattern to enhance their design. Currently, there are classes including: SalesInterface, Sales Process (to process the sales), Customer, Phone, iPhone, Samsung and Payment, in their design model. Which of the following is a good design? Select one: a. A Factory class should be created to hide the Phone and Customer classes. b. A Factory class should be created to hide the SalesInterface and Customer classes. C. A Factory class should be created to hide the SalesInterface and Sales Process classes. d. A Factory class should be created to hide the Phone, iPhone and Samsung classes.
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 3PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT