{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture6_2up - Object-Oriented Software Engineering...

Info icon This preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 6: Using Design Patterns Lecture 6 January 02, 2009 O b j e c t O r i e n t e d S o f t w a r e E n g i n e e r i n g 290 DESIGN PATTERNS The Gang-of-Four: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Design Patterns: Elements of Reusable Object Oriented Software (1995).
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
294 Pattern description Context : The general situation in which the pattern applies Problem : —A short sentence or two raising the main difficulty. Forces : The issues or concerns to consider when solving the problem Solution : The recommended way to solve the problem in the given context. —‘to balance the forces’ Antipatterns : (Optional) Solutions that are inferior or do not work in this context. Related patterns : (Optional) Patterns that are similar to this pattern. References : Who developed or inspired the pattern.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
January 02, 2009 O b j e c t O r i e n t e d S o f t w a r e E n g i n e e r i n g 310 Factory Method : The Problem
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
January 02, 2009 O b j e c t O r i e n t e d S o f t w a r e E n g i n e e r i n g 310 Factory Method : The Problem 1. Frameworks use abstract classes to define and maintain relationships between objects January 02, 2009 O b j e c t O r i e n t e d S o f t w a r e E n g i n e e r i n g 310 Factory Method : The Problem 1. Frameworks use abstract classes to define and maintain relationships between objects 2. Consider a framework for applications that present multiple documents to the user. A drawing application is an example.
Image of page 12
January 02, 2009 O b j e c t O r i e n t e d S o f t w a r e E n g i n e e r i n g 310 Factory Method : The Problem 1. Frameworks use abstract classes to define and maintain relationships between objects 2. Consider a framework for applications that present multiple documents to the user. A drawing application is an example. 3. This framework defines two abstract classes: application and document. These ought to be sub classed by clients for application specific implementation. January 02, 2009 O b j e c t O r i e n t e d S o f t w a r e E n g i n e e r i n g 310 Factory Method : The Problem 1. Frameworks use abstract classes to define and maintain relationships between objects 2. Consider a framework for applications that present multiple documents to the user. A drawing application is an example. 3. This framework defines two abstract classes: application and document. These ought to be sub classed by clients for application specific implementation. 4. The application class will create and manage documents when required, e.g. when a New command is selected from the menu.
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
January 02, 2009 O b j e c t O r i e n t e d S o f t w a r e E n g i n e e r i n g 311 Factory Method Pattern: The Problem 5. Document sub class is application specific . Hence the Application class does not know what kind of document to create!
Image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern