Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

Size: px
Start display at page:

Download "Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)"

Transcription

1 eport o H07B84 rganization inköping University, weden ast odified 5 ovember 2007 odified by eter Bunus (petbu@ida.liu.se) entamen B84 (esign önster) xamination B84 (esign atterns) inköping University, epartment of omputer and nformation cience inköping weden hone: +46 (0) Fax:

2 able of ontents nformation...1 Betygsgränser...1 nformation...2 Grading...2 ask 1: rosswords uzzle (15 points)...3 ask 1: hort nswer hort otivation (15 points)...6 ask 3 oyota rius (20 points):...10 ask 4 ibrary tems (15 points):...11 ask 5: etris (20 points)...12 ask 6: ibrary ilemma (15 points)...13 inköping University, epartment of omputer and nformation cience inköping weden

3 1 entamen: B84 esign önster ( ) xaminator: eter Bunus nformation kriv namn, klass, och personnummer på samtliga lösa blad. oängavdrag kommer att göras om punkterna nedan inte åtföljs! 1) ndast ett svar per blad. nvänd endast framsidan (delfrågor kan vara på samma sida). 2) ortera inlämnade svar med avseende på uppgiftsnummer i stigande ordning. 3) varen får vara på svenska eller engelska. 4) ina svar skall tydligt visa lösningsmetod. nbart rätt svar kommer inte att ge poäng. det fall du är osäker på frågeställning, skriv ner din tolkning och lös uppgiften utifrån din tolkning. 5) om hjälpmedel är boken av GF eller liknande tillåtna och H-bilderna från föreläsningar. nteckningar i böcker är okej. Betygsgränser [0..50) poäng Betyg 2 [50..73) poäng Betyg 3 [73..85) poäng Betyg 4 [ ] poäng Betyg 5 ycka till! inköping University, epartment of omputer and nformation cience inköping weden hone: +46 (0) Fax:

4 2 entamen B xamination: B84 esign attern ( ) xaminer: eter Bunus nformation Write your name, class, and person number on all solution sheets. lease also observe the following; otherwise it might lead to subtraction of points: 1) Write only the answer to one task on one sheet. Use only the front side of the sheets (answers to subtasks can be on one page). 2) ort the solution sheets according to the task number. 3) nswers may be in nglish or wedish. 4) Your answers should clearly show solution methods, reasons, and arguments. hort answers should be motivated. f you have to a make an assumption about a question, write down the assumptions you make. 5) he GF book or other design pattern related book is allowed during the exam. he printed lecture slides are also allowed during the examination. Grading o pass the exam you have to do at least 50 points from 100 possible. [0..50) points F [50..59) points [59..70) points [70..78) points [78..85) points B [ ] points Good uck! Bonne chance! Viel Glück! ėkmės! 祝你好運祝福 inköping University, epartment of omputer and nformation cience inköping weden

5 3 ask 1: rosswords uzzle (15 points) s a warming up exercise solve this crosswords puzzle. Hand in this page with your final exam clipserossword.com inköping University, epartment of omputer and nformation cience inköping weden

6 4 entamen B cross 1. f want to implement an algorithm in a method deferring the definition of some steps of the algorithm so that subclasses can redefine them, this design pattern would be the most appropriate 5. ttaches additional responsibilities to an object dynamically 9. n adapter and a decorator can be said to an object 12. rue or false, dapters can only wrap one object 13. his pattern will let an object act on behalf of another object 14. f you intend to defer the decision of which class to instantiate you will use this pattern 15. attern that defines an interface that applies to individual objects and group of objects 18. bstract Factory creates a of objects 19. hristopher lexander's job 23. esign attern that distributes an operation so that each implementation applies to a different type of composition. 24. rich Gamma, ichard Helm, alph Johnson and John Vlissides 27. rogram to an interface, not an 28. entralize responsibility in a class that oversees how a set of other objects interact 29. llow the addition of new operation to a class or a class hierarchy without changing the class 30. class should have only one reason to do this own 2. ll factory patterns allow us to object creation 3. his pattern allows a request to escalade up a chain of objects until one handles it. 4. esign attern that encapsulates an operation, making implementation interchangeable 6. f you are going to study overseas you might need one of these to plug in your computer. 7. Favor over inheritance 8. on't call us, we'll call you is known as the rinciple 10. attern that constructs a family that share a trait 11. he template method is usually defined in a method as an method 16. attern that distributes an operation so that each class represent a different state. 17. You apply this pattern if you would like to centralize the responsibility in a single instance of a class 20. esign attern that encapsulates a method call in an object 21. rovides a way to access a collection of instances of a class that you create 22. attern that decouples an abstraction from its implementation so that the two can vary independently 25. attern that reconstructs an object from a dormant version that contains just the object's internal state. 26. attern that provides a simple interface into a collection of classes inköping University, epartment of omputer and nformation cience inköping weden

7 5 inköping University, epartment of omputer and nformation cience inköping weden clipserossword.com H F B Y H Y W H G Y F G V B F Y F W B Y B G U H F H G H F X Y Y G he solution to the crossword puzzle is given above. he crossword contained a little misspelling on own 1 field. t should be hain of esponsibility instead of hain of esponsibility as incorrectly was required in the crossword in order to match the cross 19 field. m sorry about this misspelling and have also noticed that the same misspelling slipped away in several slides as well.

8 6 entamen B ask 1: hort nswer hort otivation (15 points) lease answer the following questions. on t forget to motivate your answer. 1. GoF divided their patterns in the following categories: reational, tructural and Behavioral. lemental, tructural and Behavioral. lemental, eferencial and Behavioral. lemental, tructural and gnostic. one of the above. nswer: he correct answer here is the first option: reational, tructural and Behavioural. s you probably know creational patterns define mechanism for creating objects, structural patterns take care of the composition of objects to obtain new and varied functionality while the behaviour patterns covers the interactions between different objects. 2. s this a valid implementation of a singleton? xplain your answer. 1: package mytuff; 2: public class ingleton { 3: private static ingleton s_singleton = new ingleton(); 4: private ingleton() {} 5: private static ingleton getnstance() { 6: return s_singleton; 7: } 8: } nswer: his class is impossible to access because all the methods, including the constructor are private. he getnstance() method need to be public and static otherwise you have no chance to access the class. 3. want to add an "undo" feature to my project. Which pattern should use? ingleton Factory method * emento tate Visitor eteris aribus evert roxy nswer: he emento pattern captures and externalizes an object s internal state so that the object can be restored later to this saved state. his will make the emento pattern an ideal candidate for undo operation. inköping University, epartment of omputer and nformation cience inköping weden

9 7 4. uppose that you need to use a complex system, but you are only going to use a little part of it. ame the pattern you would use if you want to have a simplified interface to the system. nswer: Facade pattern however defines a general solution to encapsulate complex functionality. facade is an object that provides a simplified interface to a larger body of code, such as a class library. 5. f you would like to give another name to the nterpreter pattern what name would you like to choose from the possibilities enumerated below? lease motivate briefly your answer ranslator low executor * ittle language oo much looking any many interpretations one of the above nswer: nterpreter is mostly used for interpreting languages that have a very simple grammar, therefore the most appropriate name from the list would be little language 6. When you use the final modifier in a method, what design pattern are you explicitly forbidding in that method? xplain briefly your answer: terator bserver * emplate ethod one of the above nswer: nce you have used the final modifier you are explicitly forbidding the redefinition of the method. method that is declared final in a superclass cannot be overridden in a subclass. he emplate ethod design pattern defines the skeleton of an algorithm at the superclass level and lets the sublasses to redefine certain steps of an algorithm. he sublasses need to redefine the method but if the method in the superclass it is declared final it will be imposible to use this design pattern 7. uppose that you are experiencing high coupling and dependency between an abstraction of objects and their possible implementations. Which pattern allows you to decouple things? nswer: oupling is the factor of dependency of one class on another class. he factor of coupling varies between low and high. ystems having high coupling are unstable and requires more effort to modify. n a system with high coupling factor modification in one class forces a ripple of changes in other classes and thus increases the effort required for modification. he Bridge attern will decouple an abstraction from its implementation so that the two can vary independently. his pattern is very useful when you need to vary an interface and an implementation in different ways. inköping University, epartment of omputer and nformation cience inköping weden

10 8 entamen B Which of these statements are true? dapter extends target interface (interface that client expects). dapter holds instance of daptee. dapter implements interface of daptee. nswer: he adapter can be implemented in two ways: 1. he dapter class uses multiple inheritance to adapt one interface to another 2. he dapter relies on object composition n both cases dapter adapts the interface of the daptee to the arget interface. echnically the dapter is a subclass of the arget interface so one can say that the dapter extends the arget interface even if would prefer to use the word adapt in this case. his will make the first statement true When the dapter relies on object composition the statement thet the dpater holds an instance of the daptee is also true. Based on the assumptions that you made we can accept a false answer here if you mentioned that the dpater relies on multiple inheritance instead. When the adapter class uses multiple inheritance to adapt one interface to another it can override some of the daptee s behavior since daptor is a subclass of daptee. ne can say that the dapter implements the daptee s interface. hat will make the third statement true. However this is not possible for Java where multiple inheritance is not permitted. We accept here the false answer if you have correctly motivate it. 9. "lass explosion" is having too many classes, each with slightly different behavior. ach time you want to add some new method or some new instance variable, you need to update all your classes, doubling the number of classes each time. ne way to avoid the "lass xplosion" is to use one of these patterns: dapter * ecorator roxy ingleton nswer: he ecorator design pattern provides a more flexible way to add responsibilities to a class than by using inheritance. nheritance usually leads to class xplosion. he decorator allows customizing a class without creating subclasses high in the inheritance hierarchy so it will avoid the class explosion. 10. 'm building an application that connects to several servers, but the servers are sometimes unavailable, so decide to create stubs for the services and to able to switch at runtime between real services and stub services. Which pattern am using? ingleton Factory method inköping University, epartment of omputer and nformation cience inköping weden

11 9 ommand * trategy emento one of the above nswer: trategy defines a family of algorithms, encapsulate each one, and makes them interchangeable.o one can design a strategy that will interchange during run-time the real services and the stub services. 11. oes the following code fragment implement the Factory ethod design pattern? public class XeaderFactory { // his method returns an instance of a class // that implements the Xeader interface. // he specific class it creates and returns is // based on a system property. public static Xeader createxeader(); } public interface Xeader { public void setontenthandler(ontenthandler handler): public void parse(nputtream is); } nswer: ot really. he XeaderFactory it creates a class Xeader that is independent of the client but it does not define an abstract factory method so it does not follow literally the Factory ethod esign attern. 12, What pattern(s) would you use in combination with the Visitor attern? Why? nswer: omposite. he Visitor pattern allows you to add operations to a omposite structure without changing the structure itself 13. f a roxy is used to instantiate an object only when it is absolutely needed, does the roxy simplify code? nswer: roxy doesn't necessarily simplify code. he roxy is used to create an object when needed, allowing the application to run up until this point unimpeded by the burden of loading the proxy object, which likely encapsulates large amounts of data or an action that will take a long period of time to execute. 14. Would you ever create an dapter that has the same interface as the object which it adapts? Would your dapter then be a roxy? nswer: Yes why not. f create an daper that has the same interface as the object which it adapts will have the freedom of changing the adapted object any time. o if can anticipate that the adapted object will change in the future it is perfectly acceptable to do that. n this way can guard the clients against unexpected changes in the adapted object interface. ctually this trick is very often used by experienced programmers. inköping University, epartment of omputer and nformation cience inköping weden

12 10 entamen B How complex must a sub-system be in order to justify using a facade? nswer: t is not necessary to be very complex to justify the use of the Façade. he Facade can be used to provide a simplified interface to the underlying sub-system or perhaps a small subset of the sub-system. ask 3 oyota rius (20 points): oyota rius is the first hybrid-powered production car in the world. t is claimed to cut pollutants by 90%, fuel consumption by 50% and 2 emission by 50%. riving such a hybrid car will definitely make l Gore happy. fter finishing this course you might follow a promising career as an automotive engineer at oyota. You need take up the challenge to redesign a little bit the control panel of the car. Your new board panel system should provide the following functionality: - t should contain a traditional speed meter that shows the current speed of the car in km/h. - t should contain a digital speed meter that shows the speed in miles/hour. - he speed of the car should be obviously regulated by the acceleration pedal and the breaking pedal. he speed of the car can be also modified by pushing the cruise control buttons(the + button for increasing the speed and the - button for decreasing the speed) located on the steering wheel. ) elect the most appropriate design pattern to use implement the car control panel and show how it is applied. n particular, show an appropriate class diagram(s) and enough code fragments to illustrate your use of the pattern to solve the problem. he ediator attern is the most appropriate to use here inköping University, epartment of omputer and nformation cience inköping weden

13 11 ontrolanelirector 1 -panelirector aromponents oyotaontrolanelirector -digitalpeed : igitalpeedeter -speedeter : raditionalpeedeter -cruiselus : ncreasepeedbutton -cruiseinus : ecreasepeedbutton -break : Breakedal -gas : ccelerationedal raditionalpeedeter +howpeed() igitalpeedeter +howpeed() ruiseontrolbutton +hanged() 1 ncreasepeedbutton ecreasepeedbutton +hanged() +hanged() edal +hanged() Breakedal +hanged() ccelerationedal +hanged() he oyota rius hybrid system consists of a 1.5-litre lean burn engine and an.. induction electric motor and the car operates in the following modes: - G : owered by electric motor only. rius does not employ the engine during starting, because starting is a heavy load action which greatly increases the emission pollutant. - : When the car gets up to speed, the engine joins and provides power together with the electric motor. he engine provides the necessary power that pure electric motor cannot provide. n the other hand, electric motor help easing the load taken by the engine, so emission level remains low. - BKG / WH : his is the most important advantage of hybrid car. onventional car will eliminate the kinetic energy by braking that means transferring to heat loss. rius will make good use of the kinetic energy to recharge its batteries through electric motor (now act as generator) B) elect the most appropriate design pattern that will simulate the rius operating modes from above and show how it is applied. n particular, show an appropriate class diagram(s) by extending the class diagram that you previously created at section ) and enough code fragments to illustrate your use of the pattern to solve the problem. epending on the assumptions that you made here several design patterns could have been applied. he most obvious ones would be the trategy attern and the tate attern ask 4 ibrary tems (15 points): aking as starting point the class model depicted in the figure below select the most appropriate design pattern that will help you to compute the following for an instance of ibrary: ) total number of pages for all the items in it inköping University, epartment of omputer and nformation cience inköping weden

14 12 entamen B B) how many different authors there are? how an appropriate class diagram(s) and enough code fragments to illustrate your use of the pattern to solve the problem. nswer: he Visitor esign attern is the most appropriate pattern to be used here. ask 5: etris (20 points) magine, you have to design a etris game. his game uses a 20x10 scoreboard, in upright form. From its ceiling, blocks fall down. he blocks have different forms (rectangular, square, - shaped polygons). he player can rotate the blocks while they fall down. nce a block touches the ground, it is fixed where it landed. nly one block falls at any time. nce the current block has been fixed on the ground, a new block appears below the ceiling. ) esign the class model of the game. onsider a main class for the game, a game scoreboard, and a class hierarchy for blocks. (5 points) B) esign an bstractfactory with some concrete factories for the block hierarchy. etermine which concrete block type is created by using a random generator. (15 points) nswer: bstract Factory or Factory ethod design pattern could have been used in this case inköping University, epartment of omputer and nformation cience inköping weden

15 13 ask 6: ibrary ilemma (15 points) t the company for which work we are facing the following problem: We have a large amount of application software written using a particular library. et s call this library ibx. he provider of this library was Xndustries B 1. We wanted to extend the functionality of our application and for this reason we tried to contact Xndustries B to implement the necessary library functionality. o our surprise we found out that Xndustries B has gone out of business. Fortunately we found out that there is another company called Ynterprise B is producing iby that provides the same functionality as ibx but many of the classes have different interfaces. We don t have access to the source code of the old library ibx and neither to the source code of iby. What should we do? For 15 valuable points can you tell us how to proceed further by selecting the most appropriate design pattern that we should use and show how we should apply it. n particular, show an appropriate class diagram(s) and enough code fragments to illustrate your use of the pattern to solve the problem. simple usage example would be also valuable for our engineers. nswer: he dapter pattern should be used in this situation 1 he names used herein are fictional and any resemblance to real company or product names is purely coincidental inköping University, epartment of omputer and nformation cience inköping weden

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns) Report No TENTAHT07TDDB84 Organization Linköping University, Sweden Last Modified 11 October 2007 Modified by Peter Bunus (petbu@ida.liu.se) Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design

More information

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns) Report No TENTA_TDDB84 Organization Linköping University, Sweden Last Modified 13 October 2010 Modified by Peter Bunus (peter.bunus@liu.se) Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

More information

Tentamen TDDD04 (Programvarutestning) Examination TDDD04 (Software Testing)

Tentamen TDDD04 (Programvarutestning) Examination TDDD04 (Software Testing) Report No TENTA_TDDD04 Organization Linköping University, Sweden Last Modified 6 June 2012 Modified by Peter Bunus (peter.bunus@liu.se) Tentamen TDDD04 (Programvarutestning) Examination TDDD04 (Software

More information

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns) Report No TENTA_TDDB84 Organization Linköping University, Sweden Last Modified 13 October 2009 Modified by Peter Bunus (petbu@ida.liu.se) Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

More information

Linköping University, Sweden Last Modified 13 June 2011 Peter Bunus

Linköping University, Sweden Last Modified 13 June 2011 Peter Bunus Report No TENTA_TDDD04 Organization Linköping University, Sweden Last Modified 13 June 2011 Modified by Peter Bunus (peter.bunus@liu.se) Tentamen TDDD04 (Programvarutestning) Examination TDDD04 (Software

More information

Tentamen TDDD04 (Programvarutestning) Examination TDDD04 (Software Testing)

Tentamen TDDD04 (Programvarutestning) Examination TDDD04 (Software Testing) 1 Report No TENTA_TDDD04 Organization Linköping University, Sweden Last Modified 6 June 2012 Modified by Peter Bunus (peter.bunus@liu.se) Tentamen TDDD04 (Programvarutestning) Examination TDDD04 (Software

More information

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns) Report No TENTA_TDDB84 Organization Linköping University, Sweden Last Modified 20 October 2009 Modified by Peter Bunus (petbu@ida.liu.se) Tentamen TDDB84 (Design Mönster) Examination TDDB84 (Design Patterns)

More information

SDC Design patterns GoF

SDC Design patterns GoF SDC Design patterns GoF Design Patterns The design pattern concept can be viewed as an abstraction of imitating useful parts of other software products. The design pattern is a description of communicating

More information

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) Design Pattern CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) A. Design Pattern Design patterns represent the best practices used by experienced

More information

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar Design Patterns MSc in Communications Software Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecture 20 GoF Design Patterns Behavioral Department of Computer Engineering Sharif University of Technology 1 GoF Behavioral Patterns Class Class Interpreter: Given a language,

More information

The Strategy Pattern Design Principle: Design Principle: Design Principle:

The Strategy Pattern Design Principle: Design Principle: Design Principle: Strategy Pattern The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it. Design

More information

DESIGN PATTERN - INTERVIEW QUESTIONS

DESIGN PATTERN - INTERVIEW QUESTIONS DESIGN PATTERN - INTERVIEW QUESTIONS http://www.tutorialspoint.com/design_pattern/design_pattern_interview_questions.htm Copyright tutorialspoint.com Dear readers, these Design Pattern Interview Questions

More information

Using Design Patterns in Java Application Development

Using Design Patterns in Java Application Development Using Design Patterns in Java Application Development ExxonMobil Research & Engineering Co. Clinton, New Jersey Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S.

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1 Ingegneria del Software Corso di Laurea in Informatica per il Management Design Patterns part 1 Davide Rossi Dipartimento di Informatica Università di Bologna Pattern Each pattern describes a problem which

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecturer: Raman Ramsin Lecture 20: GoF Design Patterns Creational 1 Software Patterns Software Patterns support reuse of software architecture and design. Patterns capture the static

More information

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8 Object Oriented Methods with UML Introduction to Design Patterns- Lecture 8 Topics(03/05/16) Design Patterns Design Pattern In software engineering, a design pattern is a general repeatable solution to

More information

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011 Design Patterns Lecture 1 Manuel Mastrofini Systems Engineering and Web Services University of Rome Tor Vergata June 2011 Definition A pattern is a reusable solution to a commonly occurring problem within

More information

Design Patterns. An introduction

Design Patterns. An introduction Design Patterns An introduction Introduction Designing object-oriented software is hard, and designing reusable object-oriented software is even harder. Your design should be specific to the problem at

More information

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns EPL 603 TOPICS IN SOFTWARE ENGINEERING Lab 6: Design Patterns Links to Design Pattern Material 1 http://www.oodesign.com/ http://www.vincehuston.org/dp/patterns_quiz.html Types of Design Patterns 2 Creational

More information

Design Patterns Reid Holmes

Design Patterns Reid Holmes Material and some slide content from: - Head First Design Patterns Book - GoF Design Patterns Book Design Patterns Reid Holmes GoF design patterns $ %!!!! $ "! # & Pattern vocabulary Shared vocabulary

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1 Ingegneria del Software Corso di Laurea in Informatica per il Management Design Patterns part 1 Davide Rossi Dipartimento di Informatica Università di Bologna Pattern Each pattern describes a problem which

More information

Exam in TDDB84: Design Patterns,

Exam in TDDB84: Design Patterns, Exam in TDDB84: Design Patterns, 2014-10-24 14-18 Information Observe the following, or risk subtraction of points: 1) Write only the answer to one task on one sheet. Use only the front side of the sheets

More information

What is Design Patterns?

What is Design Patterns? Paweł Zajączkowski What is Design Patterns? 1. Design patterns may be said as a set of probable solutions for a particular problem which is tested to work best in certain situations. 2. In other words,

More information

Design Pattern and Software Architecture: IV. Design Pattern

Design Pattern and Software Architecture: IV. Design Pattern Design Pattern and Software Architecture: IV. Design Pattern AG Softwaretechnik Raum E 3.165 Tele.. 60-3321 hg@upb.de IV. Design Pattern IV.1 Introduction IV.2 Example: WYSIWYG Editor Lexi IV.3 Creational

More information

Topics in Object-Oriented Design Patterns

Topics in Object-Oriented Design Patterns Software design Topics in Object-Oriented Design Patterns Material mainly from the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides; slides originally by Spiros Mancoridis;

More information

Design Patterns. CSC207 Fall 2017

Design Patterns. CSC207 Fall 2017 Design Patterns CSC207 Fall 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe the

More information

Design Patterns. CSC207 Winter 2017

Design Patterns. CSC207 Winter 2017 Design Patterns CSC207 Winter 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe

More information

EINDHOVEN UNIVERSITY OF TECHNOLOGY

EINDHOVEN UNIVERSITY OF TECHNOLOGY EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics & Computer Science Exam Programming Methods, 2IP15, Wednesday 17 April 2013, 09:00 12:00 TU/e THIS IS THE EXAMINER S COPY WITH (POSSIBLY INCOMPLETE)

More information

Design Patterns. Gunnar Gotshalks A4-1

Design Patterns. Gunnar Gotshalks A4-1 Design Patterns A4-1 On Design Patterns A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution Good designers know not to solve every problem

More information

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D Slide 1 Design Patterns Prof. Mirco Tribastone, Ph.D. 22.11.2011 Introduction Slide 2 Basic Idea The same (well-established) schema can be reused as a solution to similar problems. Muster Abstraktion Anwendung

More information

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate UNIT 4 GRASP GRASP: Designing objects with responsibilities Creator Information expert Low Coupling Controller High Cohesion Designing for visibility - Applying GoF design patterns adapter, singleton,

More information

An Introduction to Patterns

An Introduction to Patterns An Introduction to Patterns Robert B. France Colorado State University Robert B. France 1 What is a Pattern? - 1 Work on software development patterns stemmed from work on patterns from building architecture

More information

OODP Session 4. Web Page: Visiting Hours: Tuesday 17:00 to 19:00

OODP Session 4.   Web Page:   Visiting Hours: Tuesday 17:00 to 19:00 OODP Session 4 Session times PT group 1 Monday 18:00 21:00 room: Malet 403 PT group 2 Thursday 18:00 21:00 room: Malet 407 FT Tuesday 13:30 17:00 room: Malet 404 Email: oded@dcs.bbk.ac.uk Web Page: http://www.dcs.bbk.ac.uk/~oded

More information

Design Patterns. CSC207 Fall 2017

Design Patterns. CSC207 Fall 2017 Design Patterns CSC207 Fall 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe the

More information

administrivia today UML start design patterns Tuesday, September 28, 2010

administrivia today UML start design patterns Tuesday, September 28, 2010 administrivia Assignment 2? promise to get past assignment 1 back soon exam on monday review slides are posted your responsibility to review covers through last week today UML start design patterns 1 Unified

More information

Introduction to Software Engineering: Object Design I Reuse & Patterns

Introduction to Software Engineering: Object Design I Reuse & Patterns Introduction to Software Engineering: Object Design I Reuse & Patterns John T. Bell Department of Computer Science University of Illinois, Chicago Based on materials from Bruegge & DuToit 3e, Chapter 8,

More information

1 Software Architecture

1 Software Architecture Some buzzwords and acronyms for today Software architecture Design pattern Separation of concerns Single responsibility principle Keep it simple, stupid (KISS) Don t repeat yourself (DRY) Don t talk to

More information

3 Product Management Anti-Patterns by Thomas Schranz

3 Product Management Anti-Patterns by Thomas Schranz 3 Product Management Anti-Patterns by Thomas Schranz News Read above article, it s good and short! October 30, 2014 2 / 3 News Read above article, it s good and short! Grading: Added explanation about

More information

A few important patterns and their connections

A few important patterns and their connections A few important patterns and their connections Perdita Stevens School of Informatics University of Edinburgh Plan Singleton Factory method Facade and how they are connected. You should understand how to

More information

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade Plan A few important patterns and their connections Perdita Stevens School of Informatics University of Edinburgh Singleton Factory method Facade and how they are connected. You should understand how to

More information

Application Architectures, Design Patterns

Application Architectures, Design Patterns Application Architectures, Design Patterns Martin Ledvinka martin.ledvinka@fel.cvut.cz Winter Term 2017 Martin Ledvinka (martin.ledvinka@fel.cvut.cz) Application Architectures, Design Patterns Winter Term

More information

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1 What is a Design Pattern? Each pattern Describes a problem which occurs over and over again in our environment,and then describes the core of the problem Novelists, playwrights and other writers rarely

More information

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D. Software Design Patterns Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University J. Maletic 1 Background 1 Search for recurring successful designs emergent designs from practice

More information

Object-Oriented Oriented Programming

Object-Oriented Oriented Programming Object-Oriented Oriented Programming Composite Pattern CSIE Department, NTUT Woei-Kae Chen Catalog of Design patterns Creational patterns Abstract Factory, Builder, Factory Method, Prototype, Singleton

More information

Design Patterns. SE3A04 Tutorial. Jason Jaskolka

Design Patterns. SE3A04 Tutorial. Jason Jaskolka SE3A04 Tutorial Jason Jaskolka Department of Computing and Software Faculty of Engineering McMaster University Hamilton, Ontario, Canada jaskolj@mcmaster.ca November 18/19, 2014 Jason Jaskolka 1 / 35 1

More information

Module 10 Inheritance, Virtual Functions, and Polymorphism

Module 10 Inheritance, Virtual Functions, and Polymorphism Module 10 Inheritance, Virtual Functions, and Polymorphism Table of Contents CRITICAL SKILL 10.1: Inheritance Fundamentals... 2 CRITICAL SKILL 10.2: Base Class Access Control... 7 CRITICAL SKILL 10.3:

More information

Object Oriented Paradigm

Object Oriented Paradigm Object Oriented Paradigm Ming-Hwa Wang, Ph.D. Department of Computer Engineering Santa Clara University Object Oriented Paradigm/Programming (OOP) similar to Lego, which kids build new toys from assembling

More information

Applying the Observer Design Pattern

Applying the Observer Design Pattern Applying the Observer Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science Rutgers

More information

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico Modellistica Medica Maria Grazia Pia INFN Genova Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico 2002-2003 Lezione 8 OO modeling Design Patterns Introduction Creational Patterns Software

More information

Advanced Object Oriented PHP

Advanced Object Oriented PHP CNM STEMulus Center Web Development with PHP November 11, 2015 1/17 Outline 1 2 Diamond Problem Composing vs Inheriting Case Study: Strategy Design Pattern 2/17 Definition is when a class is based on another

More information

Tuesday, October 4. Announcements

Tuesday, October 4. Announcements Tuesday, October 4 Announcements www.singularsource.net Donate to my short story contest UCI Delta Sigma Pi Accepts business and ICS students See Facebook page for details Slide 2 1 Design Patterns Design

More information

Design patterns. Jef De Smedt Beta VZW

Design patterns. Jef De Smedt Beta VZW Design patterns Jef De Smedt Beta VZW Who Beta VZW www.betavzw.org Association founded in 1993 Computer training for the unemployed Computer training for employees (Cevora/Cefora) 9:00-12:30 13:00-16:00

More information

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently. Gang of Four Software Design Patterns with examples STRUCTURAL 1) Adapter Convert the interface of a class into another interface clients expect. It lets the classes work together that couldn't otherwise

More information

The Design Patterns Matrix From Analysis to Implementation

The Design Patterns Matrix From Analysis to Implementation The Design Patterns Matrix From Analysis to Implementation This is an excerpt from Shalloway, Alan and James R. Trott. Design Patterns Explained: A New Perspective for Object-Oriented Design. Addison-Wesley

More information

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout 1 Last update: 2 November 2004 Trusted Components Reuse, Contracts and Patterns Prof. Dr. Bertrand Meyer Dr. Karine Arnout 2 Lecture 5: Design patterns Agenda for today 3 Overview Benefits of patterns

More information

Design Patterns. "Gang of Four"* Design Patterns. "Gang of Four" Design Patterns. Design Pattern. CS 247: Software Engineering Principles

Design Patterns. Gang of Four* Design Patterns. Gang of Four Design Patterns. Design Pattern. CS 247: Software Engineering Principles CS 247: Software Engineering Principles Design Patterns Reading: Freeman, Robson, Bates, Sierra, Head First Design Patterns, O'Reilly Media, Inc. 2004 Ch Strategy Pattern Ch 7 Adapter and Facade patterns

More information

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming Goals of Lecture Lecture 27: OO Design Patterns Cover OO Design Patterns Background Examples Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2001 April 24, 2001 Kenneth

More information

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve? Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going

More information

CS 247: Software Engineering Principles. Design Patterns

CS 247: Software Engineering Principles. Design Patterns CS 247: Software Engineering Principles Design Patterns Reading: Freeman, Robson, Bates, Sierra, Head First Design Patterns, O'Reilly Media, Inc. 2004 Ch 1 Strategy Pattern Ch 7 Adapter and Facade patterns

More information

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns Introduction o to Patterns and Design Patterns Dept. of Computer Science Baylor University Some slides adapted from slides by R. France and B. Tekinerdogan Observations Engineering=Problem Solving Many

More information

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference 2015-2016 Visitor See lecture on design patterns Design of Software Systems 2 Composite See lecture on design patterns

More information

CSE 70 Final Exam Fall 2009

CSE 70 Final Exam Fall 2009 Signature cs70f Name Student ID CSE 70 Final Exam Fall 2009 Page 1 (10 points) Page 2 (16 points) Page 3 (22 points) Page 4 (13 points) Page 5 (15 points) Page 6 (20 points) Page 7 (9 points) Page 8 (15

More information

Foundations of Software Engineering Design Patterns -- Introduction

Foundations of Software Engineering Design Patterns -- Introduction Foundations of Software Engineering Design Patterns -- Introduction Fall 2016 Department of Computer Science Ben-Gurion university Based on slides of: Nurit Gal-oz, Department of Computer Science Ben-Gurion

More information

Creational Design Patterns

Creational Design Patterns Creational Design Patterns Creational Design Patterns Structural Design Patterns Behavioral Design Patterns GoF Design Pattern Categories Purpose Creational Structural Behavioral Scope Class Factory Method

More information

What is Design Patterns?

What is Design Patterns? Paweł Zajączkowski What is Design Patterns? 1. Design patterns may be said as a set of probable solutions for a particular problem which is tested to work best in certain situations. 2. In other words,

More information

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico Modellistica Medica Maria Grazia Pia INFN Genova Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico 2002-2003 Lezione 9 OO modeling Design Patterns Structural Patterns Behavioural Patterns

More information

Essential Skills for the Agile Developer. Agile. copyright Net Objectives, Inc.

Essential Skills for the Agile Developer. Agile. copyright Net Objectives, Inc. Essential Skills for the Agile Developer Agile copyright 2010. Net Objectives, Inc. Lean for Executives Product Portfolio Management Business Lean Enterprise ASSESSMENTS CONSULTING TRAINING COACHING Team

More information

The GoF Design Patterns Reference

The GoF Design Patterns Reference The GoF Design Patterns Reference Version.0 / 0.0.07 / Printed.0.07 Copyright 0-07 wsdesign. All rights reserved. The GoF Design Patterns Reference ii Table of Contents Preface... viii I. Introduction....

More information

A Primer on Design Patterns

A Primer on Design Patterns A Primer on Design Patterns First Edition Rahul Batra This book is for sale at http://leanpub.com/aprimerondesignpatterns This version was published on 2016-03-23 This is a Leanpub book. Leanpub empowers

More information

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS

APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS APPLYING DESIGN PATTERNS TO SCA IMPLEMENTATIONS Adem Zumbul (TUBITAK-UEKAE, Kocaeli, Turkey, ademz@uekae.tubitak.gov.tr); Tuna Tugcu (Bogazici University, Istanbul, Turkey, tugcu@boun.edu.tr) ABSTRACT

More information

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011 Design Patterns Lecture 2 Manuel Mastrofini Systems Engineering and Web Services University of Rome Tor Vergata June 2011 Structural patterns Part 2 Decorator Intent: It attaches additional responsibilities

More information

An Introduction to Patterns

An Introduction to Patterns An Introduction to Patterns Robert B. France Colorado State University Robert B. France 1 What is a Pattern? Patterns are intended to capture the best available software development experiences in the

More information

LECTURE NOTES ON DESIGN PATTERNS MCA III YEAR, V SEMESTER (JNTUA-R09)

LECTURE NOTES ON DESIGN PATTERNS MCA III YEAR, V SEMESTER (JNTUA-R09) LECTURE NOTES ON DESIGN PATTERNS MCA III YEAR, V SEMESTER (JNTUA-R09) Mr. B KRISHNA MURTHI M.TECH, MISTE. Assistant Professor DEPARTMENT OF MASTER OF COMPUTER APPLICATIONS CHADALAWADA RAMANAMMA ENGINEERING

More information

Keywords: Abstract Factory, Singleton, Factory Method, Prototype, Builder, Composite, Flyweight, Decorator.

Keywords: Abstract Factory, Singleton, Factory Method, Prototype, Builder, Composite, Flyweight, Decorator. Comparative Study In Utilization Of Creational And Structural Design Patterns In Solving Design Problems K.Wseem Abrar M.Tech., Student, Dept. of CSE, Amina Institute of Technology, Shamirpet, Hyderabad

More information

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Today we are going to talk about an important aspect of design that is reusability of design. How much our old design

More information

Think of drawing/diagramming editors. ECE450 Software Engineering II. The problem. The Composite pattern

Think of drawing/diagramming editors. ECE450 Software Engineering II. The problem. The Composite pattern Think of drawing/diagramming editors ECE450 Software Engineering II Drawing/diagramming editors let users build complex diagrams out of simple components The user can group components to form larger components......which

More information

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004 Facade and Adapter Comp-303 : Programming Techniques Lecture 19 Alexandre Denault Computer Science McGill University Winter 2004 March 23, 2004 Lecture 19 Comp 303 : Facade and Adapter Page 1 Last lecture...

More information

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University Idioms and Design Patterns Martin Skogevall IDE, Mälardalen University 2005-04-07 Acronyms Object Oriented Analysis and Design (OOAD) Object Oriented Programming (OOD Software Design Patterns (SDP) Gang

More information

Programmazione. Prof. Marco Bertini

Programmazione. Prof. Marco Bertini Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Design patterns Design patterns are bug reports against your programming language. - Peter Norvig What are design

More information

Declaration & Definition (2) Distribution of Source Code (2) Validation of Declarations. Pointers. The indirection-operator *

Declaration & Definition (2) Distribution of Source Code (2) Validation of Declarations. Pointers. The indirection-operator * Declaration & Definition (2) Distribution of ource ode (2) Declaration Variables: extern int x; int x; Definition header.h int max(int x, int y); Declaration Definition Functions: int add(int, int); int

More information

Introduction to Design Patterns

Introduction to Design Patterns Introduction to Design Patterns First, what s a design pattern? a general reusable solution to a commonly occurring problem within a given context in software design It s not a finished design that can

More information

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Software Engineering ITCS 3155 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte

More information

Applying the Factory Method Design Pattern

Applying the Factory Method Design Pattern Applying the Factory Method Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science

More information

Software Design COSC 4353/6353 D R. R A J S I N G H

Software Design COSC 4353/6353 D R. R A J S I N G H Software Design COSC 4353/6353 D R. R A J S I N G H Creational Design Patterns What are creational design patterns? Types Examples Structure Effects Creational Patterns Design patterns that deal with object

More information

DESIGN PATTERNS FOR MERE MORTALS

DESIGN PATTERNS FOR MERE MORTALS DESIGN PATTERNS FOR MERE MORTALS Philip Japikse (@skimedic) skimedic@outlook.com www.skimedic.com/blog Microsoft MVP, ASPInsider, MCSD, MCDBA, CSM, CSP Consultant, Teacher, Writer Phil.About() Consultant,

More information

Applying the Decorator Design Pattern

Applying the Decorator Design Pattern Applying the Decorator Design Pattern Trenton Computer Festival Professional Seminars Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S. in Computer Science Rutgers

More information

CS560. Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995

CS560. Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995 CS560 Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995 Classification of GoF Design Pattern Creational Structural Behavioural Factory Method Adapter Interpreter Abstract Factory Bridge

More information

Software Design COSC 4353/6353 D R. R A J S I N G H

Software Design COSC 4353/6353 D R. R A J S I N G H Software Design COSC 4353/6353 D R. R A J S I N G H Design Patterns What are design patterns? Why design patterns? Example DP Types Toolkit, Framework, and Design Pattern A toolkit is a library of reusable

More information

THE BCS PROFESSIONAL EXAMINATION BCS Level 5 Diploma in IT September 2017 EXAMINERS REPORT

THE BCS PROFESSIONAL EXAMINATION BCS Level 5 Diploma in IT September 2017 EXAMINERS REPORT THE BCS PROFESSIONAL EXAMINATION BCS Level 5 Diploma in IT September 2017 EXAMINERS REPORT Object Oriented Programming Question A1 a) Explain the terms abstract data type and encapsulation and describe

More information

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1 Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1 About the presenter Paul Kaunds Paul Kaunds is a Verification Consultant at

More information

CSCI 253. Overview. The Elements of a Design Pattern. George Blankenship 1. Object Oriented Design: Template Method Pattern. George Blankenship

CSCI 253. Overview. The Elements of a Design Pattern. George Blankenship 1. Object Oriented Design: Template Method Pattern. George Blankenship CSCI 253 Object Oriented Design: George Blankenship George Blankenship 1 Creational Patterns Singleton Abstract factory Factory Method Prototype Builder Overview Structural Patterns Composite Façade Proxy

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns?

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns? What is a Pattern? Lecture 40: Design Patterns CS 62 Fall 2017 Kim Bruce & Alexandra Papoutsaki "Each pattern describes a problem which occurs over and over again in our environment, and then describes

More information

Patterns for polymorphic operations

Patterns for polymorphic operations Patterns for polymorphic operations Three small object structural patterns for dealing with polymorphism Alexander A. Horoshilov hor@epsylontech.com Abstract Polymorphism is one of the main elements of

More information

Design Pattern- Creational pattern 2015

Design Pattern- Creational pattern 2015 Creational Patterns Abstracts instantiation process Makes system independent of how its objects are created composed represented Encapsulates knowledge about which concrete classes the system uses Hides

More information

Object-oriented Software Design Patterns

Object-oriented Software Design Patterns Object-oriented Software Design Patterns Concepts and Examples Marcelo Vinícius Cysneiros Aragão marcelovca90@inatel.br Topics What are design patterns? Benefits of using design patterns Categories and

More information

Tentamen i TDDD82 Säkra mobila system (Systemprogramvara)

Tentamen i TDDD82 Säkra mobila system (Systemprogramvara) Tentamen i TDDD82 Säkra mobila system (Systemprogramvara) 2018-06-08 Inga hjälpmedel är tillåtna. Kom ihåg att svaren på samtliga uppgifter måste MOTIVERAS, och att motiveringarna skall vara uppställda

More information