Decorator Pattern Lecture Oo29 Artificial Life Simulation.

Slides:



Advertisements
Similar presentations
Design Patterns.
Advertisements

 Recent researches show that predicative programming can be used to specify OO concepts including classes, objects, interfaces, methods, single and multiple.
18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
Broker Pattern Pattern-Oriented Software Architecture (POSA 1)
Chapter 9 Problems TC 1, 2. TC 1 Solution is to create an adapter that adapts calls from the payroll system to the payroll tax subsystem. TaxCalcAdapter.
Button click handlers Maarten Pennings. Introduction An activity has one or more views – view is also known as widget or control – examples include Button,
The Composite Pattern.. Composite Pattern Intent –Compose objects into tree structures to represent part-whole hierarchies. –Composite lets clients treat.
The OOD Process Design as a Logical Continuation of Analysis.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Design Patterns.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
CS 210 Introduction to Design Patterns September 28 th, 2006.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
1 ITEC 3010 “Systems Analysis and Design, I” LECTURE 10: Use Case Realizations [Prof. Peter Khaiter]
Design Pattern. The Observer Pattern The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Jan Ron McFadyen1 Decorator Sometimes we need a way to add responsibilities to an object dynamically and transparently. The Decorator pattern.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CS 210 Adapter Pattern October 19 th, Adapters in real life Page 236 – Head First Design Patterns.
Decorator Design Pattern Rick Mercer CSC 335: Object-Oriented Programming and Design.
Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation.
ECE450S – Software Engineering II
Nifty Assignments: Marine Biology Simulation OOPSLA ‘04 Educators’ Symposium October 25, 2004 Eric Cheng Mathias Ricken Dung “Zung” Nguyen Stephen Wong.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Stephenson College DP 98 1 Design Patterns by Derek Peacock.
Using Software Design Patterns Bill Anderson. About me Fox developer since 1987 Fox developer since 1987 Program Director, Los Angeles Visual Foxpro Developers.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 31. Review Creational Design Patterns – Singleton Pattern – Builder Pattern.
Bridge Bridge is used when we need to decouple an abstraction from its implementation so that the two can vary independently. This type of design pattern.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
Decorator Design Pattern Rick Mercer CSC 335: Object-Oriented Programming and Design.
Reconfigurable Communication Interface Between FASTER and RTSim Dec0907.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
S.Ducasse Stéphane Ducasse 1 Decorator.
Decorator Design Pattern Phillip Shin. Overview Problem Solution Example Key points.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
Design and implementation Chapter 7 – Lecture 1. Design and implementation Software design and implementation is the stage in the software engineering.
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
CS 350 – Software Design The Decorator Pattern – Chapter 17 In this chapter we expand our e-commerce case study and learn how to use the Decorator Pattern.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
Design Patterns: MORE Examples
Strategy: A Behavioral Design Pattern
Classes and their relationships
Instructor: Dr. Hany H. Ammar
Common Design Patterns
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University
Introduction to Design Patterns
Observer Design Pattern
OO Design - Observer Pattern
Design Patterns in Game Design
Decorator Pattern Intent
Jim Fawcett CSE776 – Design Patterns Summer 2003
Object Oriented Design Patterns - Structural Patterns
Decorator Pattern Richard Gesick.
Object Oriented Design Patterns - Behavioral Patterns
Nifty Assignments: Marine Biology Simulation
Lecture 8 Evolution of object behavior Behavioral patterns
WPS - your story so far Seems incredible complicated, already
Design Patterns Lecture part 1.
Decorator Pattern.
FRAMEWORKS AND REUSE What is “Framework”?
Activity 1 - Chapter 5 -.
Presentation transcript:

Decorator Pattern Lecture Oo29 Artificial Life Simulation

Teaching Points n Decorator Pattern n Artificial Life Simulation –Lab 3

Review n What is a component n How can you use components and interfaces to efficiently partition your system’s physical architecture? n In Java-style exception handling what is “thrown?”

Decorator Pattern n The Problem –sometimes we want to add responsibilities to individual objects, not to an entire class. –for responsibilities that can be add/withdrawn dynamically –when extension by subclassing is impractical

Decorator Pattern n The solution –Attach additional responsibilities to an object dynamically. –A flexible approach is to enclose the component in another object that adds the responsibility.

Decorator Pattern (structure)

Decorator Pattern (example)

Artificial Life Simulator n A framework n Pattern based –Decorator –Chain of responsibility –Observer –Iterator

Use Case Diagram

Architecture

Run Simulation Use Case

Update Creature State Use Case –Interaction with the world

Update Creature State Use Case n Reproduction

Teaching Points n Decorator Pattern n Artificial Life Simulation –Lab 3