Download presentation
Presentation is loading. Please wait.
Published bySteven Rich Modified over 9 years ago
1
DESIGN PATTERNS -CREATIONAL PATTERNS WATTANAPON G SUTTAPAK Software Engineering, School of Information Communication Technology, University of PHAYAO 1
2
จุดประสงค์การเรียนรู้ เข้าใจรูปแบบของแบบรูปการออกแบบทั้ง 5 ประเภท ประยุกต์ใช้แบบรูปการออกแบบ Factory,Abstract Factory, Singleton, Builder, Prototype Pattern ได้ 2
3
CREATIONAL PATTERNS objects creation and hiding the creation logic no instantiating objects directly flexible deciding for a given use case 5 patterns 1.Factory 2.Abstract factory 3.Builder 4.Prototype 5.Singleton
4
FACTORY PATTERN most used in java create common interface create object pattern that inherited(is a) from common interface create instant object that inherited(has a) from create object pattern create new object via instant object(common) 4
5
FACTORY PATTERN 5
6
6
7
7
8
8
9
Output Inside Circle::draw() method. Inside Rectangle::draw() method. Inside Square::draw() method. 9
10
FACTORY PATTERN 10
11
FACTORY PATTERN 11
12
ABSTRACT FACTORY PATTERN Factory of factories 12
13
ABSTRACT FACTORY PATTERN Factory Pattern Shape Circle Rectangle Square 13 Abstract Factory Pattern Color Red Blue Black AbstractFactory ColorFactory ShapeFactory FactoryProducer bstractFactoryPatternDem o
14
ABSTRACT FACTORY PATTERN 14
15
ABSTRACT FACTORY PATTERN 15
16
ABSTRACT FACTORY PATTERN 16
17
ABSTRACT FACTORY PATTERN 17
18
ABSTRACT FACTORY PATTERN 18
19
ABSTRACT FACTORY PATTERN Output 19
20
SINGLETON PATTERN Simplest design patterns Create object only single object 20
21
SINGLETON PATTERN 21 Output Hello World
22
BUILDER PATTERN Build complex object using simple objects 22
23
BUILDER PATTERN implements 23
24
BUILDER PATTERN implements 24
25
BUILDER PATTERN implements 25
26
BUILDER PATTERN implements 26
27
BUILDER PATTERN implements 27
28
BUILDER PATTERN Output 28
29
PROTOTYPE PATTERN 29 creating duplicate object while keeping performance
30
PROTOTYPE PATTERN implements 30
31
PROTOTYPE PATTERN implements 31
32
PROTOTYPE PATTERN implements 32
33
PROTOTYPE PATTERN Output 33
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.