DOC PREVIEW
MSU CSE 870 - 05-oo-modeling-behavior-notes

This preview shows page 1-2-3-27-28-29 out of 29 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSE870: Cheng11RRRObject Modeling Approach2RRRObject 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: Cheng24RRRHome Heating Requirements• The software shall control the heat in eachroom• The room shall be heated when thetemperature is 2F below desired temp• The room shall no longer be heated when thetemperature is 2F above desired temp• The flow of heat to each room shall beindividually controlled by opening and closingits water valve• The valve shall be open when the roomneeds heat and closed otherwise• The user shall set the desired temperature onthe thermostat• The operator shall be able to turn the heatingsystem on and off• The furnace must not run when the system isoff• When the furnace is not running and a roomneeds heat, the software shall turn thefurnace on• To turn the furnace on the software shallfollow these steps– open the fuel valve– turn the burner on• The software shall turn the furnace off whenheat is no longer needed in any room• To turn the furnace off the software shallfollow these steps– close fuel valve– turn burner offThe purpose of the software for the Home Heating System is to control the heating system thatheats the rooms of a house. The software shall maintain the temperature of each room within aspecified range by controlling the heat flow to individual rooms.5RRRRequirementsStatementsExtractNounsTentativeObject ClassesEliminateSpurious ClassesObjectClassesCandidate ClassesControllerFuel ValveBurnerWater PumpHot WaterFuelTemp SensorWater ValvesoftwareHome Heating Systemheating systemroomhousetemperatureheatdesired tempoperatorthermostatfurnaceon-off switchControl PanelHomerangeIdentify Object Classes6RRREliminate Bad Classes• Redundant classes– Classes that represent thesame thing with differentwords• Irrelevant classes– Classes we simply do notcare about• Vague classes– Classes with ill-definedboundaries• Attributes– Things that describeindividual objects• Operations– Sequences of actions areoften mistaken for classes• Roles– The name of a class shouldreflect what it is, not the roleit plays• Implementation details– Save that forimplementationCSE870: Cheng37RRRControllerFuel ValveBurnerWater PumpHot WaterFuelTemp SensorWater ValvesoftwareHome Heating Systemheating systemroomhousetemperatureheatdesired tempoperatorthermostatfurnaceRedundant Irrelevant Vague AttributesOperationsImplementationRolesNone NoneNoneheat flowon-off switchControl PanelhomeuserrangeEliminate Classes8RRRControllerFuel ValveBurnerWater PumpTemp SensorWater ValveHome Heating SystemRoomOperatorThermostatFurnaceon-off switchControl PanelClasses After Elimination9RRRPrepare Data Dictionary• Water Tank– The storage tank containing the water thatcirculates in the system.• Pump-1– The pump pumping water from the WaterTank to the radiators in the roomsCSE870: Cheng410RRRPossible Associations• Not much informationfrom the proserequirements• A lot of informationfrom the system design• A room consists of a thermometer and a radiator• A radiator consists of a valve and a radiatorelement• The home heating system consists of a furnace,rooms, a water pump, a control panel, and acontroller• The furnace consists of a fuel pump and aburner• The control panel consists of an on-off switchand 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 eachroom• The controller opens and closes the valves in therooms• The operator sets the desired temperature• The operator turns the system on and off• The controller gets notified of the new desiredtemperatureHome HeatingSystemControl PanelOn-Off Switch ThermostatRoomOperatorWater Valve Temp SensorFurnaceBurnerWater PumpFuel ValveControllerPushes AdjustsNotifiesMonitorActuatesIgnitesOpens/ClosesRuns1..*Object ModelHome HeatingSystemControl PanelOn-Off Switch ThermostatRoomOperatorWater Valve Temp SensorFurnaceBurnerWater PumpFuel ValveControllerPushes AdjustsNotifiesMonitorHeatsIgnitesOpens/ClosesRuns1..*1..*1..*Object Model - ModifiedCSE870: Cheng513RRRTemp SensortemperatureThermostatdesired-tempOn-Off switchsettingAttributesHome HeatingSystemControl PanelsettingOn-Off Switchdesired-tempThermostatRoomOperatorWater ValvetemperatureTemp SensorFurnaceBurnerWater PumpFuel ValveControllerPushes AdjustsNotifiesMonitorHeatsIgnitesOpens/ClosesRuns1..*1..*1..*Final OO Model15RRRIterateIterate the Model• Keep on doing thisuntil you, yourcustomer, and yourengineers are happywith the modelCSE870: Cheng616RRROperation vs Method• Operation: specifies object behavior• Service: represented by set of operns.• Message: object requests execution of anopern. from another object by sending itmesg.• Method: mesg is matched up with methoddefined by the class to which the receivingobject belongs (or any of its superclasses)• Operations of class are public servicesoffered by class.• Methods of its classes are theimplementations of these operations.17RRROO Using UML:Dynamic ModelsDefining how the objects behave18RRROverview• The object model describes the structure of the system(objects, attributes, and operations)• The dynamic model describes how the objects changestate (how the attributes change) and in which order thestate changes can take place• Several models used to find the appropriate dynamicbehavior– Interaction diagrams– Activity diagrams– State Diagrams• Uses finite state machines and expresses the changes interms of events and statesCSE870: Cheng719RRRInteraction Diagrams20RRRWe Will Cover• Why interaction diagrams?• Sequence diagrams– Capturing use-cases– Dealing with concurrency• Collaboration diagrams• When to use what• When to use interaction diagrams21RRR Different Types of Interaction Diagrams• An Interaction Diagram typically captures a use-case– A sequence of user interactions• Sequence diagrams– Highlight the sequencing of the interactions betweenobjects• Collaboration


View Full Document

MSU CSE 870 - 05-oo-modeling-behavior-notes

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
Download 05-oo-modeling-behavior-notes
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-notes 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-notes 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?