CSE8313 Object-Oriented and Design
Homework #3
(10 Points)
Due Date: On campus 11:59PM on 11/2, 2018;
Off campus 11:59PM on 11/3, 2018
Objective
To practice Factory Method Pattern and Abstract Factory Pattern.
Requirements
1. Read through Chapter 4 of the given reading material.
(You need to click into http://s2.smu.edu/~lghuang/CSE8313/homework/Chapter4.pdf but
not Chapter 4 in the textbook.)
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
Samsung Galaxy TabPro S,
Galaxy Tab S2
Gear S3, Gear S2 Notebook Keyboard Cover, Adapter
See product configuration details below:
http://www.apple.com/
http://www.samsung.com/us/
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.
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。