abstractFactory - Creational Patterns: The Abstract Factory...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Creational Patterns: The Abstract Factory CSE 335 Spring 2008 E. Kraemer
Background image of page 1

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

View Full DocumentRight Arrow Icon
Creational Patterns Abstract instantiation process Makes system independent of how its objects are created composed represented Encapsulates knowledge about which concrete classes the system uses Hides how instances of these classes are created and put together
Background image of page 2
Abstract Factory Provide an interface for creating families of related or dependent objects without specifying their concrete classes
Background image of page 3

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

View Full DocumentRight Arrow Icon
Example that would benefit from Abstract Factory { comp.Add(new MemoryTypeA); comp.Add(new CPUTypeA); comp.Add(new ModemTypeA); } ComputerModelA MemoryType A CPUTypeA ModemTypeA What if I want to build a Computer of Model B with Model B Memory,CPU and Modem?
Background image of page 4
ComputerFactory createComputer() createMemory() createCPU() createModem() CompFactoryB createComputer() createMemory() createCPU() createModem() CompFactoryA createComputer() createMemory()
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/30/2008 for the course CSE 335 taught by Professor Kraemer during the Spring '08 term at Michigan State University.

Page1 / 16

abstractFactory - Creational Patterns: The Abstract Factory...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online