January 200592.3913 Ron McFadyen1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain of interest.

Slides:



Advertisements
Similar presentations
GOALS BUSINESS MATH© Thomson/South-WesternLesson 12.1Slide Cash Sales and Sales on Account Complete a cash proof form Calculate sales invoice and.
Advertisements

Jan 15, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration: a simple cash-only success scenario of Process Sale.
Jan 2003Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Sequence Diagram Objects are represented horizontally across the top of the diagram Each object has a lifeline some exist before and/or after some are.
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Jan Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box Actors.
Jan Ron McFadyen1 Consider a simple cash-only Process Sale scenario 1. Customer arrives at a POS checkout with goods and/or services to purchase.
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” - may be of.
Fall 2009ACS-3913 Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
1 Domain Model: Adding Attributes Chapter 12 Adding Attributes.
Winter 2007ACS-3913 Ron McFadyen1 Classes Represented by a rectangle with possibly 3 compartments Customer Name Address Customer Name Address getName()
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
9/18/011 Software Requirements Analysis and Design (Continued)
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
How to Make a Domain Model Tutorial
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
Last lecture. What is a Use Case Use cases are stories (scenarios) of how actors use (interact with) the system to fulfill his goal. Examples Process.
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
R McFadyen Chapter 7 Conceptual Data Modeling.
TK2023 Object-Oriented Software Engineering CHAPTER 5 DOMAIN MODELLING.
Domain Modelling Presented By Dr. Shazzad Hosain.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
Review ♦ System sequence diagram ♦ Domain model
Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 Domain Classes.
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
INFO 620Lecture #81 Information Systems Analysis and Design Class Diagram Refinement INFO 620 Glenn Booker.
Lecture 13-17, chitkara university.  Gives a conceptual framework of the things in the problem space  Helps you think – focus on semantics  Provides.
Chapter 9 Applying UML and Patterns -Craig Larman
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Sept Ron McFadyen1 Class Diagram Begins as a conceptual or analysis class model and evolves to a design class model Used throughout the development.
Elaboration Iteration 1- Part 1
2007ACS-3913 Ron McFadyen1 Class Diagram See Schaum’s UML Outline, especially chapters 4, 5, 6, 7.
Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a more specific kind of thing (the.
Design Model Lecture p6 T120B pavasario sem.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Sept 2004Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
2007ACS-3913 Ron McFadyen1 Generalization a generalization is a relationship between a general thing (the superclass or parent class) and a more specific.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Elaboration popo.
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
OO Domain Modeling With UML Class Diagrams and CRC Cards
ER MODEL Lecture 3.
OO Domain Modeling With UML Class Diagrams and CRC Cards
a generalization is a relationship between a general thing (the
Object Oriented Analysis and Design Conceptual Model.
Domain Modeling.
Domain Modeling.
Class Diagram Begins as a conceptual or analysis class model and evolves to a design class model Used throughout the development process. More detail added.
a generalization is a relationship between a general thing (the
Object Oriented Analysis
Domain Model: Visualizing Concepts
Presentation transcript:

January Ron McFadyen1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain of interest Domain models are also called conceptual models, domain object models, analysis object models Domain models are illustrated with a class diagram containing Conceptual classes Associations Attributes

January Ron McFadyen2 Domain model

January Ron McFadyen3 Figure 10.4 Conceptual class has a symbol, intension, extension

January Ron McFadyen4 Section 10.2 Identifying conceptual classes Simple cash-only Process Sale scenario 1. Customer arrives at a POS checkout with goods and/or services to purchase 2. Cashier starts a new sale 3. Cashier enters item identifier 4. System records sale line item and presents item description, price, and running total Cashier repeats steps 3-4 until indicates done 5. System presents total with taxes calculated 6. Cashier tells customer the total and asks for payment 7. Customer pays and System handles payment...

January Ron McFadyen5 Main Success Scenario 1. Customer arrives at a POS checkout with goods and/or services to purchase 2. Cashier starts a new sale 3. Cashier enters item identifier 4. System records sale line item and presents item description, price, and running total Cashier repeats steps 3-4 until indicates done 5. System presents total with taxes calculated 6. Cashier tells customer the total and asks for payment 7. Customer pays and System handles payment 8.System logs the completed sale and sends sale and payment information to the external Accounting (for accounting and commissions) and inventory systems (to update inventory) 9.System presents receipt 10.Customer leaves with receipt and goods (if any)...

January Ron McFadyen6 Main Success Scenario Price running total total taxes payment Accounting commissions inventory receipt Customer checkout goods services Cashier sale item identifier System sale line item item description

January Ron McFadyen7 Register Item Store Sale Payment Product Catalog Product Specification Sales Line Item Cashier Customer Manager Section 10.3 Candidate Conceptual Classes No “correct” list

January Ron McFadyen8 Draw the conceptual classes in the domain model Add associations necessary to record relationships for which there is some need to preserve some memory Add attributes Section 10.4 Domain Modeling

January Ron McFadyen9 Specification (Description) conceptual classes Include a specification class when we need a description of something irrespective of its existence deletions result in loss of information it reduces duplicated information Sale SaleLineItemProductSpecification We need Product Specifications … and we’ll need them in a catalog …

January Ron McFadyen10 Specification (Description) conceptual classes A university will have a catalog that contains descriptions of courses. Student EnrollmentCourseSpecification We need Course Specifications … and we’ll need them in a catalog

January Ron McFadyen11 Lowering the Representational Gap Domain Model provides a visual dictionary of the domain vocabulary and concepts

January Ron McFadyen12 Classes are usually derived from: Where Examples thingsbook, copy, course, student, building roleslibrary member, student, director of students, admissions clerk eventsarrival, leaving, request interactionsmeeting Good object oriented design results in a class model which does not distort the conceptual reality of the domain

January Ron McFadyen13 Classes are usually derived from: Where NextGen POS thingsregister, item rolescashier eventssale

January Ron McFadyen14 Associations correspond to verbs expressing a relationship between classes objects do not exist in isolation - they fit together in some way examples: a Library Member borrows a Copy of a Book a Person works for a Company An employee is supervised by an employee Multiplicities we indicate via multiplicities the range of allowable cardinalities for participation in an association examples: 1, 1..*, 0..*, 1..3

January Ron McFadyen15 Associations PersonCompany 1..* 1 MemberBook * * * 0,1 Employee

January Ron McFadyen16 Associations Names and roles you can name the relationship and indicate how to read it you can give role names for participating objects PersonCompany Works for 1..* 1 employer employee The role of a Person in this relationship The role of a Company in this relationship The name of the relationship and the direction for reading the name

January Ron McFadyen17 Associations PersonCompany 1..* 1 MemberBook * * * 0,1 Employee reports to supervised supervisor borrower borrows Works for employee employer

January Ron McFadyen18 Attributes an object contains data which are defined as part of the Class definition examples: Students have names, addresses, etc; Courses have titles, descriptions, prerequisite information. Rectangle corner: Point Student name: string address: string

January Ron McFadyen19 attributes are preferably primitive (or just data types) boolean, date, number, string,... Invoice invDate: date Attributes

January Ron McFadyen20 Attributes show only “simple” relatively primitive types as attributes connections to other concepts are to be represented as associations, not attributes we do not show attributes that would be implementations of associations example: an Invoice would not have an attribute for Customer; that is handled by the association between Customer and Invoice Invoice invDate: date Customer name: string address: string

January Ron McFadyen21 Non-primitive types where the associated things don’t need to be distinguished, such as phone number, quantities, points … the abstraction makes sense in the problem domain a phone number has many parts an item number that has subparts in its encoding price is a Currency amount is a Currency qty_ordered is a Quantity these make sense in the problem domain the calculation: price * qty_ordered makes sense Attributes

January Ron McFadyen22 An Invoice will have a grand total Each Invoice Line will have a quantity ordered and a subtotal InvLine amount: Currency qty_ordered: Quantity Quantity amount: Number Invoice invDate: date amount: Currency Attributes Currency amount: Number

January Ron McFadyen23 No Foreign Keys as attributes in the Domain Model foreign keys are considered later in design example: an Invoice is not shown with an attribute for Customer; that is handled by the association between Customer and Invoice Invoice invDate: date Customer name: string address: string Attributes

January Ron McFadyen24 Derived attributes the UML notation is to prefix the attribute with a / SalesLineItem /quantity /subtotal Item 1..*0, 1 In this case, according to the model, there could be several items related to one line in the sale. These items are all the same type, and the quantity is therefore derivable by counting the number of related items. We are just adding more information to the model. Attributes

January Ron McFadyen25 A partial domain model

January Ron McFadyen26 Generalization a generalization is a relationship between a general thing (the superclass or parent class) and a more specific kind of thing (the subclass or child class) example: a StaffMember is a specialized kind of LibraryMember a StudentMember is a specialized kind of LibraryMember LibraryMember StaffMemberStudentMember

January Ron McFadyen27 Generalization Multiple subclasses can be grouped to indicate they are related subclasses LibraryMember StaffMemberStudentMember It then becomes meaningful to consider certain constraints: complete, incomplete, disjoint, overlapping

January Ron McFadyen28 Generalization Inheritance of attributes and behaviour: everything a LibraryMember can do, a StaffMember can do everything a LibraryMember can do, a StudentMember can do If a LibraryMember can borrow a book, so can a StaffMember and a StudentMember a StaffMember and a StaffMember have all the attributes the LibraryMember has, and possibly more Specialization: there are some things that a specialized class can do that a LibraryMember cannot LibraryMember StaffMemberStudentMember

January Ron McFadyen29 example: a SavingsAccount is a specialized kind of BankAccount a ChequingAccount is a specialized kind of BankAccount a BankAccount is a specialized kind of Asset RealEstate is … Asset RealEstateBankAccountSecurity SavingsAccountChequingAccount

January Ron McFadyen30 Payment Amount: money Cash Payment Credit PaymentCheque Payment Sale Pays-for 1 1 Every payment, regardless of whether it is cash, credit, or cheque, has an Amount and it is associated with a Sale CreditCardCheque *

January Ron McFadyen31 Motivation for partitioning a conceptual class into subclasses: subclass has additional attributes of interest subclass has additional associations of interest subclass is operated on, handled, reacted to, or manipulated differently than the superclass or other subclasses the subclass concept represents an animate thing that behaves differently than the superclass or other subclasses

January Ron McFadyen32 The name Payment is italicized - meaning it is an abstract class An abstract class is a class that will never be instantiated; only its subclasses can exist If “Payment” was not in italics then a Payment could exist that is not a Cash, Credit, or Check payment Payment Amount: money Cash Payment Credit PaymentCheque Payment

January Ron McFadyen33 What is the difference: Payment Unauthorized Payment Authorized Payment PaymentState Unauthorized StateAuthorized State Payment Is-in * 1

January Ron McFadyen34 A composite is a group of objects in which some objects contain others; one object may represent groups, and another may represent an individual item, a leaf. Composite Pattern We will examine the composite pattern later in the course. At this time, we are many concerned with its structural aspect. Consider the class diagram that follows. What objects does it allow us to instantiate and how will they relate to one another?

January Ron McFadyen35 Generic UML class diagram Component Operation() Leaf Operation() Composite Operation() Other() * Client Composite Pattern

January Ron McFadyen36 MachComponent getMachineCount() Machine getMachineCount() MachComposite components: List getMachineCount() * PlantFloor 1 * 1 Composite Pattern Consider a UML class diagram for machines. Machines may be complex and contain other machines.

January Ron McFadyen37 An object diagram illustrating the machine on floor 5 of the plant L1: Machine M1: MachComposite L2: Machine L7: MachineL4: Machine M9: MachComposite floor5 :Plantfloor Composite Pattern