Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Homework
Objective
To practice Factory Method Pattern and Abstract Factory Pattern.
Requirements
1. Read through Chapter 4 of the given reading material.
2. Design and implement the class(es) using factory method pattern to create an Apple online
smartphone store ("iPhone 8", "iPhone 7 Plus", "iPhone X") and a Samsung online
smartphone store ("Galaxy Note7", "Galaxy S7 edge"); Order a "iPhone 7 Plus" and order a
"Galaxy Note7" from the corresponding store.
Order procedure: select model ? input mailing address ? make a payment ? finish
3. Design and implement the class(es) using abstract factory pattern to create an Apple online
store and a Samsung online store; Order an iPad Pro with a Beats headphone and Galaxy Tab
S2 with a keyboard cover.
Tablet Watch Computer Accessories
Apple iPad Pro, iPad Air 2,
iPad mini 4
Apple Watch Series 2,
Apple Watch Nike+
MacBook AirPods, Beats Headphones
4. Draw one class diagram for each of the above two implementations.
5. Print out the screenshot showing the compilation and execution of your programs. The output
format of your programs should be similar to the screenshot shown on page 130.
6. Language: Java
7. Environment: Eclipse
Submission to Canvas
One zip file containing the following:
o Two program folders named as “phonefactorymethod” and “phoneabstractfactory”
containing the Java executable file and all class files for each of the above two
programs, respectively.
o One PDF file describing
? how to compile and execute your two programs including how to set the
environmental class path and your Java version number.
Class diagrams for both designs.
Compilation and execution screenshots for both programs.