lecture12 - CSE 335 Dr Charles B Owen Object-Oriented...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 335 Dr. Charles B. Owen Object-Oriented Programming 1 Factories Creational Patterns Simple Factories Abstract Factory Pattern (GoF 87) Factory Method Pattern (GoF 107) Making Things CSE 335 Dr. Charles B. Owen Object-Oriented Programming 2 A disclaimer I Love Canada! I’ve been there many times and spent 6 months in Toronto once. Any perceived insult to the fine country of Canada should be considered for humor purposes only. Q: How do you stop bacon from curling in the frying pan? A: Take away their brooms! Blame Canada Blame Canada With all their beady little eyes And flapping heads so full of lies Blame Canada, Academy Award nominee for Best Song nominee CSE 335 Dr. Charles B. Owen Object-Oriented Programming 3 How would you describe this guy (in software) Harold CSE 335 Dr. Charles B. Owen Object-Oriented Programming 4 His Parts Shirt Right Leg Left Leg Right Arm Right Hand Left Arm Left Hand Vest Head Bottom Head Top Shirt Right Leg Left Leg Vest Left Arm Right Arm Head Bottom Left Hand Right Hand Head Top Any patterns come to mind? CSE 335 Dr. Charles B. Owen Object-Oriented Programming 5 His Parts Shirt Right Leg Left Leg Right Arm Right Hand Left Arm Left Hand Vest Head Bottom Head Top Shirt Right Leg Left Leg Vest Left Arm Right Arm Head Bottom Left Hand Right Hand Head Top You should be thinking of the composite pattern here CSE 335 Dr. Charles B. Owen Object-Oriented Programming 6 His Parts Shirt Right Leg Left Leg Right Arm Right Hand Left Arm Left Hand Vest Head Bottom Head Top Our system has drawable items , each of which has a location , rotation , and a center of rotation . Items can be arranged hierarchically, such that moving a parent also moves the children . Some drawables, like the arms , are simple polygons . Some, like the vest , are images . The top of the head has an image and also draws different types of eyebrows and eyes . We’ll also need to be able to draw text bubbles on the screen so our characters can talk. We will need to be able to draw our items in an order unrelated to the tree structure . CSE 335 Dr. Charles B. Owen Object-Oriented Programming 7 UML (my idea) Difference from previous Composite Pattern: Every Drawable can have children (why?) Just the drawables CSE 335 Dr. Charles B. Owen Object-Oriented Programming 8 Design Decisions Any ideas on this?...
View Full Document

  • Fall '10
  • OWEN
  • T-shirt, Dr. Charles B. Owen, Charles B. Owen, B. Owen Object­Oriented, Owen Object­Oriented Programming, Dr. Charles B.

{[ snackBarMessage ]}

Page1 / 29

lecture12 - CSE 335 Dr Charles B Owen Object-Oriented...

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

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