University of Toronto University of Toronto Department of Computer Science Department of Computer Science What to Model Lecture 6 Requirements Modeling II Last Last Week Week Modeling ModelingEnterprises Enterprises General GeneralModeling ModelingIssues Issues Modeling ModelingHuman HumanActivity Activity i i etc etc Information Structure Entity Relationship Models Class Diagrams OO Analysis Processes and Information Flow Dataflow diagrams Structured Analysis UML Activity Diagrams This This Week Week Modelling Modelling Information Information and and Behaviour Behaviour Information InformationStructure Structure Information Flow Information Flow Behaviour Behaviour System Behaviour Statecharts Message Sequence Charts Tabular specifications e g SCR Next Next Week Week Non functional Non functionalrequirements requirements Modelling ModellingNFRs NFRs Analysis Analysistechniques techniquesfor forNFRs NFRs 2000 2003 Steve Easterbrook 1 University of Toronto Department of Computer Science Entity Relationship Diagrams ER diagrams widely used for information modeling simple easy to use Note this is a notation not a method Used in many contexts domain concepts objects referred to in goal models scenarios etc Data to be represented in the system for information systems name age attributes Attribute Relationship a b services c d Cardinality of Department of Computer Science Class Diagrams patient Name Date of Birth Height Weight 0 1 Colour 0 2 Diameter Correction multiplicities kidney Operational 0 1 0 1 1 2 heart Normal bpm generalization Identifier Cast eye aggregation relationship 0 n 1 Blood type Composite Identifier 1 n Film Relational Database design Meta modeling producer director title 2000 2003 Steve Easterbrook Entity Actor 2 University of Toronto Class name Key nationality 2000 2003 Steve Easterbrook In patient Out patient Room Bed Physician Last visit next visit physician organ Natural artif Orig implant donor year 3 2000 2003 Steve Easterbrook 4 1 University of Toronto University of Toronto Department of Computer Science Generalization vs Aggregation Class associations Multiplicity A client has exactly one staffmember as a contact person Source Examples from Bennett McRobb Farmer 2002 Generalization Subclasses inherit attributes associations operations from the superclass A subclass may override an inherited aspect Aggregation This is the Has a or Whole part relationship Composition staffName staff staffStartDate aggregation if the whole is removed from the model so is the part the whole is responsible for the disposition of its parts 1 Role The staffmember s role in this association is as a contact person 2000 2003 Steve Easterbrook 5 6 University of Toronto Association Classes Department of Computer Science Object Oriented Analysis Sometimes the association is itself a class because we need to retain information about the association and that information doesn t naturally live in the classes at the ends of the association Background Model the requirements in terms of objects and the services they provide Grew out of object oriented design But applied to modelling the application domain rather than the program E g a title is an object that represents information about the relationship between an owner and her car Motivation OO is claimed to be more natural person As a system evolves the functions processes it performs tend to change but the objects tend to remain unchanged Hence a model based on functions processes will get out of date but an object oriented model will not hence the claim that object oriented designs are more maintainable Name 1 Address DriversLicenceNumber owner PermittedVehicles owns Role The clients role in this association is as a clientList 2000 2003 Steve Easterbrook Department of Computer Science VIN vehicle Id Number 0 YearMade Mileage Client companyAddress 0 companyEmail companyFax ClientList companyName companyTelephone Direction The liaises with association should be read in this direction composition car liaises with contact person generalization University of Toronto Name of the association Multiplicity A staff member has zero or more clients on His her clientList StaffMember Strong form of aggregation that implies ownership Department of Computer Science OO emphasizes importance of well defined interfaces between objects compared to ambiguities of dataflow relationships title yearbought initialMileage PricePaid LicencePlate 2000 2003 Steve Easterbrook NOTE OO applies to requirements engineering because it is a modeling tool But we are modeling domain objects not the design of the new system 7 2000 2003 Steve Easterbrook 8 2 University of Toronto University of Toronto Department of Computer Science Nearly anything can be an object Department of Computer Science Variants Source Adapted from Pressman 1994 p242 External Entities that interact with the system being modeled E g people devices other systems Things Organizational Units Places Occurrences or Events that occur in the context of the system Structures played by people who interact with the system E g sensors four wheeled vehicles computers etc 9 University of Toronto 2000 2003 Steve Easterbrook University of Toronto Department of Computer Science Example method Coad Yourdon Five Step Process 1 Identify Objects Classes i e is a relationships 2 Identify Structures i e part of relationships 3 Define Subjects Department of Computer Science Third generation OO method Booch Rumbaugh Jacobson are principal authors Still in development Attempt to standardize the proliferation of OO variants Is purely a notation A more abstract view of a large collection of objects Each classification and assembly structure become one subject Each remaining singleton object becomes a subject although if there a many of these look for more structure Subject Diagram shows only the subjects and their interactions No modeling method associated with it But has been accepted as a standard for OO modeling But is primarily owned by Rational Corp who sell lots of UML tools and services 4 Define Attributes and instance connections 5a Define services 3 types Has a standardized meta model Use case diagrams Class diagrams Message sequence charts Activity diagrams State Diagrams uses Harel s statecharts Module Diagrams Platform diagrams Occur create connect access release These are omitted from the model as every object has them Calculate when a calculated result from one object is needed by another Monitor when an object
View Full Document
Unlocking...