1 / 13

Object Oriented Design

Object Oriented Design. Goals. More on UML: Sequence Diagrams Game 1: Truck versus Frog Workshop: start game design #2 . Problem Analysis Behavior. Diagrams. Structural Diagrams (represent static application structure) Class Diagram ( examples ) Object Diagram ( examples )

lundy
Télécharger la présentation

Object Oriented Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object Oriented Design

  2. Goals • More on UML: Sequence Diagrams • Game 1: Truck versus Frog • Workshop: start game design #2

  3. Problem AnalysisBehavior

  4. Diagrams • Structural Diagrams (represent static application structure) • Class Diagram (examples) • Object Diagram (examples) • Component Diagram • Deployment Diagram • Behavior Diagrams (represent different aspects of dynamic behavior) • Use Case Diagram • Sequence Diagram (examples) • Activity Diagram • Collaboration Diagram • Statechart Diagram • Model Management Diagrams (ways you can organize and manage your application modules) • Packages • Subsystems • Models

  5. Sequence Diagrams • Sequence diagrams describe BEHAVIOR through describing interactions among classes • Interactions are modeled as exchanges of messages • Contain: • Class roles, the roles an object may/can play within the interaction • Lifelines, the existence of an object over time • Activations, active time when an object performs an operation • Messages, communication between objects • – source: http://www.redwood.nl

  6. Notation used in a Sequence Diagram

  7. Sequence Diagrams Structure System Border :class1 :class2 :class3 :class4 message() new() local() use case scenario written down here check() [check=true] new() Time

  8. Game 1: Frogger • You are a frog. Your task is simple: hop across a busy highway, dodging cars and trucks, until you get the to the edge of a river, where you must keep yourself from drowning by crossing safely to your grotto at the top of the screen by leaping across the backs of turtles and logs. But watch out for snakes and alligators! (Sega, 1980)

  9. Modeling Frog versus Truck …from the perspective of the • Frog • Truck • Highway using a sequence diagram

  10. More objects • How to create and dispose trucks on the fly?

  11. Workshop: Model Space Invaders • Analyze Specification: what is missing? • Design Structure: • Class diagram • Object diagram (screen dump) • Design Behavior: • Sequence Diagrams

  12. Homework Checkpoint • Download AgentSheets • Key will be emailed to you • Build Frogger game • Email project (Alex & Andri) • Windows: use “email project” feature • Mac: stuff project folder • Due: Sept. 10

  13. Announcements • Office hours change THIS WEEK ONLY • Instead of Wednesday: Thursday, Sept 5, 2-3pm

More Related