Domain Modeling Yonglei Tao.

Slides:



Advertisements
Similar presentations
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Advertisements

UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
UML – Class Diagrams.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
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.
Chapter 14 (Web): Object-Oriented Data Modeling
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
7M822 UML Class Diagrams advanced concepts 15 September 2008.
6. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how events can be used to identify use cases that define requirements.
1 Object-Oriented Modeling Using UML CS 3331 Fall 2009.
Distribution of Marks Internal Sessional Evaluation Assignments – 10 Quizzes – 10 Class Participation Attendence – 5 Mid – Term Test – 25 External Evaluation.
Chapter 14: Object-Oriented Data Modeling
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Use Cases Yonglei Tao.
Domain Modeling 中国科学技术大学软件学院 孟宁 2012 年 10 月 Domain Modeling ♦What: A process performed by the development teams to acquire domain knowledge. ♦Why: –Because.
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.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
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.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
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.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Domain Modeling Part2: Domain Class Diagram Chapter 4 pp part 2 1.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
Domain Model Refinement Larman, chapter 31 CSE 432: Object-Oriented Software Engineering Glenn D. Blank, Lehigh University.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
The Unified Process & Domain Modeling 中国科学技术大学软件学院 孟宁 2011 年 10 月.
What is a Structural Model?
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
Object-Oriented Data Modeling
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
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.
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
CMSC 345 Fall 2000 OO Design. Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent.
UML (Unified Modeling Language)
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Modeling with UML – Class Diagrams
Object-Oriented Modeling
DATA REQIREMENT ANALYSIS
ATM OO Design and Implementation Case Study
Chapter 5: Structural Modeling
Chapter 11 Object-Oriented Design
Domain Model Refinement
Class diagram Description
UML Class Diagrams: Basic Concepts
Domain Class Diagram Chapter 4 Part 2 pp
Lec 3: Object-Oriented Data Modeling
Software Engineering Lecture #11.
UML Class Diagram.
SYS466 Domain Classes – Part 1.
Understand and Use Object Oriented Methods
Systems Analysis – ITEC 3155 Modeling System Requirements – Part 2
ITEC 3220A Using and Designing Database Systems
Object Oriented System Design Class Diagrams
Chapter 5: Domain Modeling Part 1 – UML Class Diagram
Presentation transcript:

Domain Modeling Yonglei Tao

Classes and Objects in UML

Representing Type in UML SSN: String checkin(time:float):void name: String checkout(time:float):void Employee

Associations

Multiplicity

Associations

Inheritance User Staff Student id: String name: String login(id, password) logout() Staff Student processApplication() applyOnline()

Rules for Inheritance A subclass is a (kind of) superclass A superclass is more general than a subclass 100% of the superclass’s definition should be applicable to the subclass Attributes Associations

Is-A Relationship

Two Tests for Inheritance IS-A test: every instance of a subclass is also an instance of the superclass. Conformance test: relationships of a superclass are also relationships of subclasses. Engine model# horse power manufacturer start() stop() Car drive() Professor name phone teach(...) Visiting Professor signContract() Retirement Plan enroll Car is not an engine. Visiting professors cannot enroll in a retirement plan at the host university.

Creating a Subclass Include additional features of interest attributes associations Include different behavior add new operations redefine superclass operations Support software reuse (with modification)

Creating a Superclass Factor out common features among subclasses common attributes, associations, and behavior code sharing Allow potential subclasses representing variations of a similar concept provide a common interface support polymorphic processing

Justifying a Class Hierarchy

Abstract Class Represents a class that never has any concrete instances Defines an interface for related subclasses Every member of the class must also be a member of a subclass

Abstract Classes

Aggregation Relationship Car model# horse power manufacturer start() stop() Engine part-of relationship

Composite Relationship

Part-Of Relationships Composite the whole solely owns the parts the part’s lifetime is bound within the lifetime of the whole certain properties of the whole propagate to the parts Aggregation logical assembly the parts can be referenced by one or more wholes

Why Composition? Help determine the lifetime of a object a create-delete dependency of the part on the whole Help identify an object creator Provide a way of grouping hide parts within the whole

Association Classes

Association Class An association class defines properties and operations for an association between two classes. Student Course enroll * Enroll grade: char getGrade() setGrade(grade:char)

Understand Association Class Alex got an “A” and Eric got a “B” for OOSE. :Enroll ‘A’: char getGrade() setGrade() Alex:Student OOSE:Course enroll ‘B’: char Eric:Student :Enroll ‘A’: char getGrade() setGrade() Alex:Student AI:Course enroll Alex also got an “A” for AI.

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

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

Constraints

Steps for Domain Modeling 1) Collecting application domain information focus on the functional requirements also consider other requirements and documents also consider business descriptions 2) Brainstorming list important application domain concepts list their properties/attributes list their relationships

Steps for Domain Modeling (Cont.) 3) Classifying the domain concepts into: classes attributes / attribute values relationships association, inheritance, aggregation 4) Visualizing the result using a UML class diagram

Brainstorming: Rules to Apply Team members get together to identify and list domain specific concepts 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

Identify Important Concepts “An undergraduate student or a graduate student can apply to no more than two exchange programs per semester. An application consists of an application form, two faculty recommendation letters, and a course equivalent form to be approved by an academic advisor.” … “An exchange program has program name, program type, academic department, academic subject, country, region, term of study, and language.”

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 part of Y X is a role in an association association relationships attribute values attribute / multiplicity values aggregation or attribute aggregation relationships association or aggregation inheritance

Examples Domain specific nouns/noun phrases transitive verbs exchange program semester undergraduate student Domain specific nouns/noun phrases apply to (programs) transitive verbs Rule: transitive verbs Þ association relationships Rule: noun/noun phrase  class or attribute Because they exist independently in the application domain.

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

Visualizing in a Class Diagram

Class Exercise Do the following for the vending machine (next slide). 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

Class Exercise: The Vending Machine The Vending Machine has a display, an alphanumeric keypad, a coin insertion slot, and an item dispenser. The display shows the vending items like chocolates, candies, potato chips, Coke, sprite, etc. Each type of item has a price and a label consisting of a letter A, B, C, ... and a digit 1, 2, ... A customer inserts coins through the coin slot. Each time a coin is inserted an LCD displays the total amount. The customer can press a letter and a digit to enter his selection after enough coins have been inserted. If the total amount is greater than or equals to the item selected, the vending machine dispenses the item and returns the change to the customer. A customer can change his mind and request that the coins be returned by pressing the return button.