Unformatted text preview:

Model DerivationLecture OutlineElements of xUML ModelsWhat? - Class DiagramWhat? - Determine Behaviors of EntitiesWhat? – System BehaviorHow? – Derivation ProcessClassesIdentifying classesIdentifying ClassesLinguistic Analysis – Microwave OvenAttributesAttributes Entities/Classes with States [attributes]RelationshipsPropertiesPropertiesLifecyclesState MachinesUser-Environment with actionsActionsState Machine with Actions9/3/2008 CS371S Fall 2008 Model Derivation1Model DerivationFrom Requirements to ModelsWhat?How?Examples?9/3/2008 CS371S Fall 2008 Model Derivation2Lecture Outline•What?– Entities, relationships and behavior– xUML model•How?– Linguistic Analysis– Object Behavior Analysis– Use cases, activity diagrams, etc.• Examples– Simple Microwave Oven– Miscellaneous illustrations9/3/2008 CS371S Fall 2008 Model Derivation3Elements of xUML Models• Systems = Domains and Bridges• Domains = Class Diagrams• Bridges = Interactions Among Domains• Class Diagrams = Classes + Relationships• Class = Attributes + State Machine + Constraints• State Machine = Events (Signals) + Actions9/3/2008 CS371S Fall 2008 Model Derivation4What? - Class Diagram• Identify entities in specification. Entities are classes• Identify attributes of entities -> attributes of classes• Identify relationships among classes–“has a”–“is a”– Associative• Identify constraints on the possible values of attributes.9/3/2008 CS371S Fall 2008 Model Derivation5What? - Determine Behaviors of Entities• Construct the lifecycle (state machine) which controls the behavior of each entity.• Construct the state transition table for each entity.• Design the action to be executed in each state of the state machine.9/3/2008 CS371S Fall 2008 Model Derivation6What? – System Behavior• Identify and record the communication among the entities• Identify a set of use cases which define the environment in which the system will execute• Define a class or classes which implement these use cases.9/3/2008 CS371S Fall 2008 Model Derivation7How? – Derivation Process1. Derive Class Diagram1. Define classes and select attributes2. Define associations/relationships among classes3. Construct associative classes4. Iterate steps 1, 2 & 3 until consistent2. Construct State Models1. Construct state model for each object with multiple states2. For each state model, define actions effecting state changes3. Iterate until consistent9/3/2008 CS371S Fall 2008 Model Derivation8Methods for identifying classes, attributes and relationships• Linguistic analysis of requirements specification -textbook • Object Behavior Analysis – Rubin and Goldberg paper (related to Use Case analysis)• Use Case AnalysisPractical Approach - Apply multiple methods and compare resulting class diagramHow? – Class Diagram9/3/2008 CS371S Fall 2008 Model Derivation9Identify the classes . The classes derive from noun phrases. Go through the requirements statement and pick out all of the important nouns. Categorize these nouns into tangible items or devices, physical classes, roles, interactions, instance specifications, etc.. Decide which ones are significant and which ones are redundant and select classes.Identify attributes for each object. Attributes come from possessive phrases, as descriptions of the nouns. Recall that the attributes define the identity and the state of an object.Identify relationships. Relationships can be derived by looking at the verb phrases of the requirements analysis. Verb phrases include suchthings as the PC board "is made up of" chips and connectors, etc..Specialize and generalize classes into subtypes and supertypes and create associative, create object definitions for m to n associations or dynamic associations which fall under the heading of events,interactions which have to be remembered.How? - Class Diagrams via Linguistic Analysis9/3/2008 CS371S Fall 2008 Model Derivation10Classes• A class is an abstraction from a set of conceptual entities in a domain.• An object is an instance of a class.• They all share the same characteristics.• They all behave according to the same rules and policies. • These rules and policies may include constraints which supplement the defined behaviors.9/3/2008 CS371S Fall 2008 Model Derivation11Identifying classes• Tangible Things• Roles played by people or organizations• Incidents• Specifications•Etc.9/3/2008 CS371S Fall 2008 Model Derivation12Classes Are Akin To Pornography Or Beautytangible entity or device - airplanerole - professor, studentincident or persistent event - registration of automobileinteraction - contract termsspecification – sets of entities with related characteristicsorganization - universityexternal systems - sensor drivesIdentifying Classes9/3/2008 CS371S Fall 2008 Model Derivation13Identifying ClassesWhich Nouns are Classes? Not all nouns are classesDoes it have interesting state? Qualified by attributes (adjectives) defining state.Does it do anything?Does it store data or information accessed by other classes?9/3/2008 CS371S Fall 2008 Model Derivation14The microwave is powered by a powertube with a wattage rating and a part number, it incorporates: an interior light with a specified wattage and part number, a beeper which has a specified part number and a control button. The door of the oven is latched by a friction catch. In the current product the powertube consumes 600 watts and light consumes 40 watts.This simple oven has a single control button. When the oven door is closed and the user presses the button, the oven will cook (that is, energize the power tube) for 1 minute.There is a light inside the oven. Any time the oven is cooking, the light must be turned on, so you can peer through the window in the oven's door and see if your food is bubbling. Any time the door is open, the light must be on, so you can see your food or so you have enough light to clean the oven.When the oven times out (cooks until the desired preset time), it turns off both the power tube and the light. It then emits a warning beep to signal that the food is ready.The user can stop the cooking by opening the door. Once the door is opened, the timer resets to zero.Closing the oven door turns out the light. Specifications for the Control Software for a One-Button Microwave9/3/2008 CS371S Fall 2008 Model Derivation15Linguistic Analysis – Microwave OvenNoun or Noun Phrase Type (Tangible,


View Full Document

UT CS 371S - Model Derivation

Download Model Derivation
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 Model Derivation 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 Model Derivation 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?