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

Ready for the Real World Kenneth M. Anderson University of Colorado, Boulder CSCI 4448/5448 — Lecture 8 — 09/17/2009 1

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

View Full Document
Lecture Goals • Review material from Chapter 4 of the OO A&D textbook • Taking Your Software into the Real World • Alternative Designs / Design Trade-Offs • Use Case Analysis / More about Class Diagrams • Discuss the Chapter 4 Example: Todd & Gina’s Dog Door, Take 3 • Emphasize the OO concepts and techniques encountered in Chapter 4 2
Quiz (from last time) • Draw a UML class diagram that captures the following relationships • The world is a matrix of locations. Each location is a particular type of terrain (water, grass, forest, mountain) and may have the player on it or one or more creatures. A player can either be a warrior or a wizard. A warrior has access to one or more weapons, each that deal different amounts of damage and that have different ranges (e.g., a bow can attack a creature that is Fve squares or closer). A wizard has access to one or more spells, each that deal different amounts of damage, have different ranges, and that might linger for one or more turns. A creature has a description and two attacks, one melee and one ranged, that deal different amounts of damage. Both creatures and players have a certain number of hit points and know their current location in the world. 3

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

View Full Document
One Student Submission! 4 ͞ΕΖΤΔΣΚΡΥΚΠΟ ͞Ω ͞Ϊ ͞ΕΒΞΒΘΖ ͞ΣΒΟΘΖ ͢ ͛͢͟͟ ͞ΕΒΞΒΘΖ ͞ΣΒΟΘΖ ͞ΝΚΟΘΖΣ ͢ ͛͢͟͟ ͢ ͢ ͞ΙΚΥΡΠΚΟΥ ͢͢ ͢ ͢ ͢ ͢
My attempt 5 x: Integer y: Integer Location Water Grass Forest World x, y x: Integer y: Integer hitPoints: Integer Entity range: Integer duration: Integer Attack min: Integer max: Integer Damage Player description: String Creature Warrior Wizard ranged melee * * A location can be empty, contain a single player or one or more creatures spells weapons

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

View Full Document
An alternative… 6 x: Integer y: Integer Location Water Grass Forest World x, y hitPoints: Integer Entity range: Integer duration: Integer Attack min: Integer max: Integer Damage Player description: String Creature Warrior Wizard ranged melee * * A location can be empty, contain a single player or one or more creatures spells weapons * 0..1
Quiz 7 • What are the steps of a use case called? • What guideline (or guidelines) does this action step violate • “The systems gets the data and checks to see if its valid” • What are the semantics of an unadorned association between two classes? • Why does the addition of directionality and/or multiplicity make it harder to implement an association?

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

View Full Document
Quiz 8 • What are the steps of a use case called? • action steps • What guideline (or guidelines) does this action step violate • “The systems gets the data and checks to see if its valid” Write from a Bird’s Eye View and Do not use “checks whether” • What are the semantics of an unadorned association between two classes?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}