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.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question
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: Sales Interface, 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.
Transcribed Image Text: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: Sales Interface, 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.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Software Development
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT