Domain Modeling 中国科学技术大学软件学院 孟宁 2012 年 10 月 Domain Modeling ♦What: A process performed by the development teams to acquire domain knowledge. ♦Why: –Because.

Slides:



Advertisements
Similar presentations
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Advertisements

09 Inheritance. 2 Contents Defining Inheritance Relationships of Inheritance Rules of Inheritance super and this references super() and this() methods.
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
6. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how events can be used to identify use cases that define requirements.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Systems Analysis and Design in a Changing World, Tuesday, Feb 27
Systems Analysis and Design in a Changing World, Fifth Edition
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
1 Chapter 2 (Cont.) The BA’s Perspective on Object Orientation.
Use Case Modeling 中国科学技术大学软件学院 孟宁 2011年9月.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Association Class Generalization/Specialization Whole-Part Page More Associations 1.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
Object oriented classification Classification is the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 Domain Classes.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Domain Modeling Part2: Domain Class Diagram Chapter 4 pp part 2 1.
Today in OOAD  The Domain Model Artifact UML Classes  EU-Bid Domain Model Exercise  EU-Lease Domain Model Assignment Guest Speaker  Kate Cunningham,
Chapter 8 Analysis & Modeling. Data Modeling examines data objects independently of processing focuses attention on the data domain creates a model at.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Class diagram Used for describing structure and behaviour in the use cases Provide a conceptual model of the system in terms of entities and their relationships.
Domain Model Classes and Objects Association Structure Requirement Specification Domain Model.
Lecture 6: Structural Modeling
5 Systems Analysis and Design in a Changing World, Fifth Edition.
The Unified Process & Domain Modeling 中国科学技术大学软件学院 孟宁 2011 年 10 月.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved COS240 O-O Languages AUBG,
Design Model Lecture p6 T120B pavasario sem.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets.
Domain Modeling Yonglei Tao.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
UML Class Diagram. A class diagram shows 1.Classes 2.The relationships between them.
12 OBJECT-ORIENTED DESIGN CHAPTER
 Class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and.
DBMS ER model-2 Week 6-7.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
Unit 1 - Introducing Abstract Data Type (ADT) Part 1.
Class Diagram Associations Class Diagrams, Class Stereotypes, Class Associations Dr. Neal CIS 480.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Entity-Relationship Model
DATA REQIREMENT ANALYSIS
Analysis and Design with UML: Discovering Classes and Relationships
Chapter 8 Analysis & Modeling
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Analysis and Design with UML: Discovering Classes and Relationships
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
ATS Application Programming: Java Programming
Analysis and Design with UML: Discovering Classes and Relationships
Domain Class Diagram Chapter 4 Part 2 pp
Software Engineering Lecture #11.
Data Modeling with Entity Relationship Diagrams (Cont.)
Software Engineering System Modeling Extra examples Dr.Doaa Sami
Understand and Use Object Oriented Methods
Systems Analysis – ITEC 3155 Modeling System Requirements – Part 2
Analysis and Design with UML: Classes and Relationships
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Chapter 5: Domain Modeling Part 1 – UML Class Diagram
From Class Diagram to Contract Diagram
Presentation transcript:

Domain Modeling 中国科学技术大学软件学院 孟宁 2012 年 10 月

Domain Modeling ♦What: A process performed by the development teams to acquire domain knowledge. ♦Why: –Because software engineers need to work in different domains or different projects. They need domain knowledge to develop the system. –Software engineers come from different background. This may affect their perception of the application domain. ♦How: –Collect domain information, perform team brainstorming and classification, and visualize the domain knowledge using UML class diagram –Detail is given in the next slide

Steps for Domain Modeling 3. Classification 4. Visualization 1. Collecting application domain information 2. Brainstorming

Object and Attribute ♦A noun/noun phrase can be a class or an attribute, how do we distinguish? ♦This is often a challenge for beginners. ♦Rules to apply: –An object has an "independent existence" in the application/application domain, an attribute does not (have). –Example: "Number of seats", class or attribute? –Attribute, because "number of seats" cannot exist without referring to a car, airplane, or classroom as in "number of seats of a car" , "number of seats of a classroom"

Object and Attribute ♦Rules to apply: –attributes describe objects or store state information of objects –objects must be created by invoking a constructor (explicitly or implicitly)

Inheritance Relationship ♦Inheritance relationships –express the generalization/specialization relations between concepts –one concept is more general/specialized than the other –example: vehicle is a generalization of car, car is a specialization of vehicle –also called IS-A relation Vehicle model# horse power manufacturer start() drive() Car drive() Bus drive()

Aggregation Relationship ♦Aggregation relationships – express the fact that one object is part of another object – engine is part of a car – also called part-of relationships Car model# horse power manufacturer start() stop() Engine model# horse power manufacturer start() stop() part-of relationship

Association Relationship ♦Association relationships –expressing general relationships other than inheritance and aggregation –these can be application specific relationships between two concepts –example: "instructor teach course", "user has account" Professor name phone teach(...) Retirement Plan enroll Neither inheritance nor aggregation can apply.

Steps for Domain Modeling ♦1) Collect application domain information –focus on the functional requirements –also consider other requirements and documents ♦2) Brainstorming –listing important application domain concepts –listing their properties/attributes –listing their relationships to each other ♦3) Classifying the domain concepts into: –classes –attributes / attribute values –relationships association, inheritance, aggregation ♦4) Document result using UML class diagram

Brainstorming: Rules to Apply ♦The team members get together to identify & list –nouns / noun phrases –"X of Y" expressions (e.g., color of car) –transitive verbs –adjectives –numeric –possession expressions (has/have, possess, etc.) –"constituents / part of" expressions –containment / containing expressions –"X is a Y" expressions

Example Functional requirement: [PFR1] The web-based application must provide a search capability for overseas exchange study programs using a variety of search criteria. domain specific transitive verb domain specific noun/noun phrase Brainstorming result: nouns/noun phrases programs search criteria transitive verbs search for adjective, but not domain specific nouns but not domain specific

Classifying Brainstorming Result ♦nouns/noun phrases ♦"X of Y" expressions ♦transitive verbs ♦adjectives ♦numeric ♦possession expressions (has/have, possess, etc.) ♦"consist of/part of" expression ♦containment / containing expressions ♦"X is a Y" expressions  class or attributes  X is an attribute of Y  X is a role in an association  association relationships  attribute values  attribute / multiplicity values  aggregation relationships or attributes  aggregation relationships  association or aggregation relationships  inheritance Objects have independent existence, attributes do not.

Example program search criteria user Domain specific nouns/noun phrases search for (programs) transitive verbs Rule: transitive verbs  association relationships Rule: noun/noun phrase  class or attribute (c) search for Because they can exist independently.

Example A car has a make, model, horse power, number of seats... (c) car (a) make (a) model (a) horse power (a) number of seats A customer can rent one or more cars... (c) customer (c) car rent 1+ Car has independent existence. Make, model, horse power, and number of seats do not.

Class Exercise ♦Do the following for your team project ♦Identify the concepts that exist in the application domain. ♦Classify the concepts in terms of –classes –attributes of classes –relationships between the classes inheritance aggregation and association

Association Class An association class defines properties and operations for an association between two classes. Enroll grade: char getGrade() setGrade(grade:char) Students enroll in courses StudentCourse enroll and receive grades. indicate Enroll class is a class for the association

Understand Association Class Alex got an “ A ” and Eric got a “ B ” for OOSE. :Enroll ‘ A ’ : char getGrade() setGrade() Alex:StudentOOSE:Course enroll :Enroll ‘ B ’ : char getGrade() setGrade() Eric:StudentOOSE:Course enroll :Enroll ‘ A ’ : char getGrade() setGrade() Alex:StudentAI:Course enroll Alex also got an “ A ” for AI. object identifier type an instance of Course indicated by underline

Understand Association Class Enroll grade: char getGrade() setGrade(grade:char) StudentCourse enroll Student *alex=new Student(... ); Course *oose=new Course (... );... Enroll *e=new Enroll(alex, oose); e->setGrade( ‘ A ’ ); class Student {... } class Course {...} class Enroll { private: char grade; Student* student; Course* course; public: Enroll (Student* s, Course* c); char getGrade(); void setGrade(char grade); } Enroll::Enroll(Student* s, Course* c) { student=s; course=c; } Design Implementation

Understand Association Class Enroll grade: char getGrade() setGrade(grade:char) StudentCourse enroll Student Course sid phone... name cn desc title... Enroll sid grade cn... OO Realm RDB Realm Alex Eric c1... oose c2... AI 001 A... c1 001 A... c2 002 B... c1

Tip for Domain Modeling 4) Have a member or two to convert the result to UML class diagram. 6) Modify the diagram to reflect corrections and comments. Do not do brainstorming and drawing at the same time. The result could be very poor. 1) List the concepts, and then classify them on a whiteboard. 2) Take a picture(s) of the whiteboard using a digital camera. 3) the digital images to team members. 5) the UML class diagram to all members to review.

谢谢大家! References Dr. David Kung University of Texas Arlington May 2010