New version page

MSU CSE 870 - 05-oo-modeling-behavior

Documents in this Course
HW2

HW2

3 pages

splc1

splc1

21 pages

Lessons

Lessons

3 pages

revision

revision

13 pages

ft1

ft1

12 pages

john.dsn

john.dsn

21 pages

Survey

Survey

2 pages

revision

revision

38 pages

Load more
Upgrade to remove ads
Upgrade to remove ads
Unformatted text preview:

Object Modeling ApproachSlide 2The Home Heating SystemHome Heating RequirementsIdentify Object ClassesEliminate Bad ClassesEliminate ClassesClasses After EliminationPrepare Data DictionaryPossible AssociationsObject ModelObject Model - ModifiedAttributesFinal OO ModelIterate the ModelOperation vs MethodOO Using UML: Dynamic ModelsOverviewInteraction DiagramsWe Will CoverDifferent Types of Interaction DiagramsHome Heating Use-CaseSequence DiagramsExample from FowlerConcurrencyAnother ExampleComment the DiagramCollaboration DiagramsConditional BehaviorComparisonWhen to Use Interaction DiagramsState DiagramsSlide 33Events, Conditions, and StatesMaking a Phone Call ScenarioPartial Class DiagramEvent TraceState Diagram for ScenarioScenario 2Modified State MachineConditionsOperations (AKA Actions)Hierarchical State MachinesInformation HidingEvent GeneralizationSlide 46State Machines - SummaryWhen to use State MachinesComing up with the State DiagramsModeling ApproachScenario-1Scenario-2Dynamic ModelMore Dynamic ModelEven More Dynamic ModelIdentify Key OperationsComplete OO ModelSlide 58Activity DiagramsSlide 60Slide 61Why Activity DiagramsCoffee ExampleHACS Use-CasesActivity Diagrams for Use CasesSwimlanes (Who Does What?)Problems with Activity DiagramsWhen to Use Activity DiagramsApproaching a ProblemWhere Do We Start?How Do We Continue?How Do We Wrap Up?Why is requirements analysis difficult?Slide 74First Law of Software EngineeringReasons for changing requirementsRequirements ProductsAnalysis: Steps to followUse CasesAnalysis: Object ModelSlide 81Slide 82Object Model: Steps to followAnalysis: Dynamic modelDynamic Model: Steps to followAnalysis: IterationCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)1RRRObject Modeling ApproachCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)2RRRObject Modeling Approach•Start with a problem statement–High-level requirements•Define object model–Identify objects and classes–Prepare data dictionary–Identify associations and aggregations–Identify attributes of objects and links–Organize and simplify using inheritance–Iterate and refine the model–Group classes into modules9080706050OnOffControllerFuel ValveBurnerWater PumpHot WaterFuelTemp SensorWater ValveControl PanelHomeThe Home Heating SystemCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)4RRRHome Heating Requirements•The software shall control the heat in each room•The room shall be heated when the temperature is 2F below desired temp•The room shall no longer be heated when the temperature is 2F above desired temp•The flow of heat to each room shall be individually controlled by opening and closing its water valve•The valve shall be open when the room needs heat and closed otherwise•The user shall set the desired temperature on the thermostat•The operator shall be able to turn the heating system on and of•The furnace must not run when the system is of•When the furnace is not running and a room needs heat, the software shall turn the furnace on•To turn the furnace on the software shall follow these steps–open the fuel valve–turn the burner on•The software shall turn the furnace of when heat is no longer needed in any room•To turn the furnace of the software shall follow these steps–close fuel valve–turn burner ofThe purpose of the software for the Home Heating System is to control the heating system that heats the rooms of a house. The software shall maintain the temperature of each room within a specified range by controlling the heat flow to individual rooms.CSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)5RRRRequirementsStatementsExtractNounsTentativeObject ClassesEliminateSpurious ClassesObjectClassesCandidate ClassesControllerFuel ValveBurnerWater PumpHot WaterFuelTemp SensorWater ValvesoftwareHome Heating Systemheating systemroomhousetemperatureheatdesired tempoperatorthermostatfurnaceon-off switchControl PanelHomerangeIdentify Object ClassesCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)6RRREliminate Bad Classes•Redundant classes–Classes that represent the same thing with diferent words•Irrelevant classes–Classes we simply do not care about•Vague classes–Classes with ill defined boundaries•Attributes–Things that describe individual objects•Operations–Sequences of actions are often mistaken for classes•Roles–The name of a class should reflect what it is, not the role it plays•Implementation details–Save that for implementationCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)7RRRControllerFuel ValveBurnerWater PumpHot WaterFuelTemp SensorWater ValvesoftwareHome Heating Systemheating systemroomhousetemperatureheatdesired tempoperatorthermostatfurnaceRedundant Irrelevant Vague AttributesOperations ImplementationRolesNone NoneNoneheat flowon-off switchControl PanelhomeuserrangeEliminate ClassesCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)8RRRControllerFuel ValveBurnerWater PumpTemp SensorWater ValveHome Heating SystemRoomOperatorThermostatFurnaceon-off switchControl PanelClasses After EliminationCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)9RRRPrepare Data Dictionary•Water Tank –The storage tank containing the water that circulates in the system.•Pump-1 –The pump pumping water from the Water Tank to the radiators in the roomsCSE870: Advanced Software Engineering -- UML Dynamic Models (Cheng, Sp2003)10RRRPossible Associations•Not much information from the prose requirements•A lot of information from the system design•A room consists of a thermometer and a radiator•A radiator consists of a valve and a radiator element•The home heating system consists of a furnace, rooms, a water pump, a control panel, and a controller•The furnace consists of a fuel pump and a burner•The control panel consists of an on-of switch and a thermostat•The controller controls the fuel pump•The controller controls the burner•The controller controls the water pump•The controller monitors the temperature in each room•The controller opens and closes the valves in the rooms•The operator sets the desired temperature•The operator turns the system on and of•The controller gets notified of the new desired temperatureHome HeatingSy stemControl PanelOn-Off Switch ThermostatRoomOperatorWater Valv e


View Full Document
Download 05-oo-modeling-behavior
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 05-oo-modeling-behavior and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 05-oo-modeling-behavior 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?