Domain Modeling: Associations and Attributes

Similar documents
Domain Modeling. CSSE 574: Week 1, Part 3. Steve Chenoweth Phone: Office (812) Cell (937)

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Goal: build an object-oriented model of the realworld system (or imaginary world) Slicing the soup: OOA vs. OOD

Domain Model and Domain Modeling

Operations Contracts and Preliminaries on Design

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D

GRASP ing at the First 5 Patterns Principles CSSE 574: Session 3, Part 4

On to Iteration 3, and Activity Diagrams CSSE 574: Session 6, Part 1

Information Expert (or Expert)

Designing for Visibility & Mapping to Code CSSE 574: Session 4, Part 3

Responsibilities. Using several specific design principles to guide OO design decisions.

Object-Oriented Functional Analysis and Design for POS Example

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

Entity Relationship Diagram (ERD) Dr. Moustafa Elazhary

Logical Architecture & Design Preliminaries

Four More GRASP Principles CSSE 574: Session 5, Part 2

Excerpt from "Art of Problem Solving Volume 1: the Basics" 2014 AoPS Inc.

Domain Modeling- 2. Generalization

System Analysis and Design. Data Flow Diagram. System Analysis and Design

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

Constantinos Constantinides Computer Science and Software Engineering Concordia University Montreal, Canada

Programming Logic and Design Seventh Edition Chapter 2 Elements of High-Quality Programs

Äriprotsesside modelleerimine ja automatiseerimine Loeng 7 Valdkonna mudel

KNOWLEDGE BASE 1. SHORT ANSWER CONTENT/SUMMARY LINES 2. LIMIT NUMBER OF ANSWERS PER PAGE

Class Diagrams in Analysis

Lecture Transcript While and Do While Statements in C++

COMP 354: INTRODUCTION TO SOFTWARE ENGINEERING

Data Analysis 1. Chapter 2.1 V3.1. Napier University Dr Gordon Russell

Intro. Scheme Basics. scm> 5 5. scm>

Introduction to Computer Programming for Non-Majors

Introduction to Computer Programming for Non-Majors

Entity Relationship Modelling

IT Web and Software Developer Software Development Standards

Basic Structural Modeling. Copyright Joey Paquet,

File Processing Approaches

Data Process Modeling: Context Diagrams & Data Flow Diagrams (DFDs)

Federal Plain Language Guidelines

MATH 90 CHAPTER 8 Name:.

Section 0.3 The Order of Operations

An Introduction to Business Process Modeling using Data Flow Diagrams

The Studio Director QuickBooks Help

user.book Page 45 Friday, April 8, :05 AM Part 2 BASIC STRUCTURAL MODELING

OO Design2. Design Artifacts

Information Systems (Informationssysteme)

COMP 6471 Software Design Methodologies

MIS2502: Data Analytics Relational Data Modeling - 1. JaeHwuen Jung

6.001 Notes: Section 8.1

More Object Design with GoF Patterns (continued) CSSE 574: Session 7, Part 3

Software Modeling & Analysis

CSSE 374: UML Activity Diagrams. Shawn Bohner Office: Moench Room F212 Phone: (812)

Lecture 8: Use Case -Driven Design. Where UML fits in

Programming Logic and Design Sixth Edition Chapter 2 Working with Data, Creating Modules, and Designing High-Quality Programs

THE UNIVERSITY OF THE WEST INDIES. Answer ALL questions. Marks for each question are given in the margin. This exam is worth 60 marks

Represent entities and relations with diagrams

Request for Credit in Accounts Payable

WAWF Government Furnished Property (GFP) Module: GFP Attachment Training

Text Input and Conditionals

More Object Design with GoF Patterns CSSE 574: Session 7, Part 2

Premium POS Pizza Order Entry Module. Introduction and Tutorial

Welcome to Computers for ESL Students, 4th Edition

ER DIAGRAM ER) diagram, a graphical representation of entities and their relationships to each other, typically used in computing in regard to the

CS 251 Intermediate Programming Methods and Classes

CS 251 Intermediate Programming Methods and More

COMN 1.1 Reference. Contents. COMN 1.1 Reference 1. Revision 1.1, by Theodore S. Hills, Copyright

Domain Analysis. SWEN-261 Introduction to Software Engineering. Department of Software Engineering Rochester Institute of Technology.

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

Conceptual Data Modeling Using E-R Models. PM Jat

Dependent Independent Input Discrete. X Y Output Continuous

CS61A Summer 2010 George Wang, Jonathan Kotker, Seshadri Mahalingam, Eric Tzeng, Steven Tang

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships

Applying Some More Gang of Four Design Patterns CSSE 574: Session 5, Part 4

Lecture 2. Database design. The Entity-Relationship model

For Volunteers An Elvanto Guide

System Sequence Diagrams. Based on Craig Larman, Chapter 10 and Anuradha Dharani s notes

Lecture 13: Analysis Modeling

6.1 Evaluate Roots and Rational Exponents

2.4 Choose method names carefully

Design First ITS Instructor Tool

Mapping Designs to Code

Entity-Relationship Model &

Guideline for Determining the TOE

Entity Attribute STUDENT TABLE tuples single domain

Week - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02)

Systems Analysis and Design Methods Chapter 7: Data Modeling and Analysis

Information Technology Audit & Cyber Security

Object-Oriented Software Engineering Practical Software Development using UML and Java

What is a Model? Copyright hebley & Associates

Persistence Frameworks with GoF Patterns (State & Command) CSSE 574: Session 7, Part 4

From designing to coding

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Python allows variables to hold string values, just like any other type (Boolean, int, float). So, the following assignment statements are valid:

PROCURE-TO-PAY. Government Furnished Property Attachment

ACCESSING ONLINE DATABASES FROM YOUR HOME OR OFFICE FOR JOBSEEKERS

CS103 Spring 2018 Mathematical Vocabulary

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.

Drawing in 3D (viewing, projection, and the rest of the pipeline)

CMSC 201 Fall 2016 Lab 09 Advanced Debugging

Object Analysis & Design in the textbook. Introduction to GRASP: Assigning Responsibilities to Objects. Responsibility-Driven Design

ADVANCED SOFTWARE DESIGN LECTURE 7 GRASP

Transcription:

Domain Modeling: Associations and Attributes CSSE 574: Week 2, Part Steve Chenoweth Phone: Office (82) 877-8974 Cell (937) 657-3885 Email: chenowet@rose-hulman.edu Q

Description Classes A description class contains information that describes something else (e.g., ProductDescription) Example: An Item instance represents a physical item in a store Item data only recorded within Item instances When a real-world item is sold, we remove the software Item goes away Problem: last Item sold, how much for the Item? Duplication also a problem

Solution: Use A Description Class. When information must be retained independent of existence of instances of the described item 2. When deleting the described item could result in information loss 3. When it reduces redundant information

Creating a Domain Model Identify Candidate Conceptual classes Draw them in the initial Domain Model Add requisite associations to record key relationships Add attributes to preserve relevant information Apply existing Analysis Patterns Use existing names for things, the vocabulary of the domain Exclude irrelevant features Rules of thumb for Conceptual Classes If it takes up space, then it is probably a conceptual class. If you can t think of a thing as a number or text, then it is probably a conceptual class. 4

Q2 Associations A relationship between classes that indicate some meaningful connection between instances of the classes Says that we need some memory of the relationship A memory in the real world, not a software need Not about data flows, foreign key relationships, instances variables, or software pointers

Q3 Association Notation Association name: Use verb phrase Capitalize Typically camel-case or hyphenated Avoid has, use Reading direction: Can exclude if association reads left-to-right or topto-bottom Multiplicity (Cardinality): * means many x..y means from x to y inclusively

Multiplicity (AKA Cardinality) * T zero or more; "many"..* T one or more..40 T one to 40 5 T exactly 5 3, 5, 8 T exactly 3, 5, or 8 7

Q4 Common Association Lists Association Category POS Examples A is a transaction related to another transaction B A is a line item of a transaction B A is known/logged/recorded in/on B CashPayment PaysFor Sale SalesLineItem ContainedIn Sale Sale CapturedOn Register

Attributes Include attributes that the requirements suggest need to be remembered Notation ( [ ] indicate optional parts): [+ -] [/] name [: [type] [multiplicity]] [= default] [{property}] Visibility Derived e.g., readonly

Q5 Attribute Examples What does each part mean? Note: While visibility is possible in Domain Models, use it sparingly.

Recording Quantity of Items SalesLineItem 0.. Records-sale-of Item Each line item records a separate item sale. For example, tofu package. SalesLineItem 0.. Records-sale-of..* Item Each line item can record a group of the same kind of items. For example, 6 tofu packages. SalesLineItem /quantity 0.. Records-sale-of..* derived attribute from the multiplicity value Item

Cartoon of the Day okay, but because you said that, we re breaking up. Related?

Q6 In Domain Model, Use Data Type Attributes Primitive data types: Boolean, String, Real, Integer, Sometimes more complex, but not domain specific: Address, Color, Phone Number, If it s domain specific, use a class and association Intuition from code: a data type is a primitive type, or a complex type where for instances a and b, a.equals(b) doesn t imply a == b

Create Your Own Complex Data Type When It has attributes of its own There are operations associated with it (e.g., validation) It s a quantity with a unit

Q7 Showing Data Type Attributes Choose the representation that best communicates with the stakeholders

Domain Model Guidelines, Summarized Classes first, then associations and attributes Use existing models, category lists, noun phrases Include report objects, like Receipt, if they re part of the business rules Use terms from the domain Don t send an attribute to do a conceptual class s job Use description classes to remember information independent of instances and to reduce redundancy Use association for relationship that must be remembered Be parsimonious with associations Name associations with verb phrases, not has or uses Use common association lists Use attributes for information that must be remembered Use data type attributes Define new data types for complex data Communicate with stakeholders

7 NexGen POS Domain Model Register Item Store Sale CashPayment Sales LineItem Cashier Customer Product Catalog Product Description Stocks * Houses..* Used-by * Contains..* Describes * Captured-on Contained-in..* Records-sale-of 0.. Paid-by Is-for Logscompleted * Works-on..* 0.. Ledger Recordsaccountsfor