Prototype Pattern 1.

Slides:



Advertisements
Similar presentations
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Generator Design Patterns: The Factory Patterns.
Advertisements

1 Class members Class definitions consist of variable declarations and method definitions, collectively called members of the class. Variables declared.
Prototype8-1 Prototype CS490 Design Patterns Alex Lo, Rose-Hulman Institute May 13, 2003.
Prototype Pattern Creational Pattern Specify the kinds of objects to create using a prototypical instance, and create new objects by copy this prototype.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Collaboration Diagrams. Example Building Collaboration Diagrams.
Class template Describing a generic class Instantiating classes that are type- specific version of this generic class Also are called parameterized types.
Prototype Pattern Intent:
1 Creational Patterns CS : Software Design Winter /T8.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
Prototype Creational Design Pattern By Brian Cavanaugh September 22, 2003 Software, Design and Documentation.
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Abstract Factory Pattern.
Creational Patterns Making Objects The Smart Way Brent Ramerth Abstract Factory, Builder.
Type Laundering & Prototype Pattern Kunal Chaudhary.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns II.
1 Chapter 3 and 6– Classes, Objects and Methods Object-Oriented Programming Concepts – Read it from Java TutorialJava Tutorial Definition: A class is a.
Abstract Factory Design Pattern making abstract things.
Software Components Creational Patterns.
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Command Pattern.
CDP-1 9. Creational Pattern. CDP-2 Creational Patterns Abstracts instantiation process Makes system independent of how its objects are –created –composed.
Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.
DESIGN PATTERNS Sanjeeb Kumar Nanda 30-Aug What is a pattern? Pattern is a recurring solution to a standard problem Each Pattern describes a problem.
Prototype pattern Participants Prototype (Graphic) – declared an interface for cloning itself ConcretePrototype (EditBox, Slider) – implements an operation.
Chapter 10 Classes and Objects In-Depth. Chapter 10 A class provides the foundation for creating specific objects, each of which shares the general attributes,
CS 590L – Distributed Component Architecture 02/20/2003Uttara Paingankar1 Design Patterns: Factory Method The factory method defines an interface for creating.
Final Class Diagram for C++ Implementation Clickermatic Software Clicker.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
1 Prototype Design Pattern Nitin Prabhu Adapted from presentations of Mike Fortozo,John Lin
Billy Bennett June 22,  Intent Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
Creational Design Patterns Yaodong Bi December 21, 2015December 21, 2015December 21, 2015.
Design Patterns Introduction
The Prototype Pattern (Creational) ©SoftMoore ConsultingSlide 1.
Singleton Pattern Presented By:- Navaneet Kumar ise
Reference – Object Oriented Software Development Using Java - Jia COP 3331 Object Oriented Analysis and Design Chapter 10 – Patterns Jean Muhammad.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
The Memento Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Overview of Creational Patterns ©SoftMoore ConsultingSlide 1.
Random Logic l Forum.NET l State Machine Mechanism Forum.NET 1 st Meeting ● December 27, 2005.
PROTOTYPE. Design Pattern Space Purpose ScopeCreationalStructuralBehavioral ClassFactory MethodAdapterInterpreter Template Method ObjectAbstract factory.
The State Design Pattern A behavioral design pattern. Shivraj Persaud
S.Ducasse Stéphane Ducasse 1 Abstract Factory.
Design Patterns Creational Patterns. Abstract the instantiation process Help make the system independent of how its objects are created, composed and.
Abstract Factory pattern Intent Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
Defining Classes. Why is Java designed this way? Improving our class Creating our own class Using our class Implementing our class.
SOFTWARE DESIGN Design Patterns 1 6/14/2016Computer Science Department, TUC-N.
Introduction to Classes and Objects CS-2303, C-Term C++ Program Structure Typical C++ Programs consist of:– main –A function main –One or more classes.
Command Pattern. Intent encapsulate a request as an object  can parameterize clients with different requests, queue or log requests, support undoable.
Generator Design Patterns: Singleton and Prototype
Abstract Factory Pattern
Factory Method Pattern
Factory Patterns 1.
Prototype Design Pattern
Creational Pattern: Prototype
Software Design and Architecture
Creational Design Patterns
Design Patterns with C# (and Food!)
Factory Method Pattern
Abstract Factory Pattern
Intent (Thanks to Jim Fawcett for the slides)
State Design Pattern 1.
Adapter Pattern 1.
Object Oriented Design Patterns - Creational Patterns
Observer Pattern 1.
Flyweight Pattern 1.
Lesson 5: More on Creational Patterns
Lists Chapter 8.
Creational Patterns.
Memento Pattern 1.
What is this?
Object Oriented Programming
Presentation transcript:

Prototype Pattern 1

Definition Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype

Prototype p = prototype.Clone Class Diagram Client Prototype prototype Operation() Clone() ConcretePrototype1 ConcretePrototype2 Prototype p = prototype.Clone Clone() Clone() // return copy of this // return copy of this

Participants Prototype ConcretePrototype Client declares an interface for cloning itself ConcretePrototype  implements an operation for cloning itself Client  creates a new object by asking a prototype to clone itself

?

References Dofactory – “Prototype” http://www.dofactory.com/net/prototype-design-pattern