requirement specification domain model

13
Domain Model Classes and Objects Association Structure Requirement Specification Domain Model

Upload: derex

Post on 22-Feb-2016

58 views

Category:

Documents


0 download

DESCRIPTION

Requirement Specification Domain Model. Domain Model Classes and Objects Association Structure. Information Need in the IT System. Information need are found by analysing the problem-domain for the IT system Ask the question: What information should be registered by the IT system ? - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Requirement Specification Domain Model

Domain ModelClasses and ObjectsAssociation Structure

Requirement SpecificationDomain Model

Page 2: Requirement Specification Domain Model

Information Need in the IT System

Information need are found by analysing the problem-domain for the IT systemAsk the question: What information should be registered by the IT system ?The building blocks are objects

binds requirements, design and program togetherResult: A model showing the problem-domain – we call it Domain Model

” The most important model in OO analysis”

2

Page 3: Requirement Specification Domain Model

RequirementFunctionalUse case: find customer1. A sales person wants to find

information about customer2. The sales person types the

customers id3. The system returns

information about the customer

Non functionalThe system has to be user friendly

Clarify informationCustomer: id, name, address

Objects binds requirements, design and programming together

33

DesignDesign of architectureDesign of GUIDesign of classes

Design database

ImplementationWriting the code

public class Customer{ private int id, private String name; private String address; public Customer(int id) { this.id = id; } public String getName() { return name; }…..

Testid name address

Customer

Domain object of class

Customer

Page 4: Requirement Specification Domain Model

Class, objects, attributes and valuesCustomer is candidate Object of class ”Customer”for a class

A class describes a collection of objects of the same attributes, structure, and behaviour pattern

4

Page 5: Requirement Specification Domain Model

Domain model

A domain model is the visual representation of conceptual classesWe illustrate it by drawing a UML class diagram:1. Domain objects or conceptual classes2. Associations between the objects3. Each objects attributes

A conceptual class is described by:name (symbol)Definition – the purpose in problem domain (intension)Examples given on objects created from class (extension)

5

Page 6: Requirement Specification Domain Model

6

Example of a conceptual class

Class:

Definition: The customer class is used to describe the company's customers.

An example: Hans Andersen, Eventyrvej 2, 5000 Odense, phone 75 45 67 89,

e-mail: [email protected] ……

Attributes: Name, adress, phone, e-mail

Customer

Name

Adress

Phone

E-mail

Customer

Page 7: Requirement Specification Domain Model

A Domain Model

The classes are connected - here by an associationdrawn as the line between the concepts. Nameable of a verb phrase. Start with Capital

Add the multiplicitydefines how many instances(objects) of a class that can be associated with an instance (object) of another classEx: a student can be enrolled in none or 1 team

Result: A UML class diagram

7

Page 8: Requirement Specification Domain Model

Requirement specification

.

8Try to create this one in UMLet

Page 9: Requirement Specification Domain Model

"Multiplicity" - Diversity or cardinality

9

Page 10: Requirement Specification Domain Model

Association

Relation between a number of objects. AssociationA customer can have more orders at once – an order belongs to one customer only.

Drawn as a simple line like this:

10

Customer Order

0..*1 0..*1

+belongs to+has

Class diagram for order management

Lisa:Customer

10342:OrderPeter:Customer

10343:orderJane:Customer

10349:Order

Object diagram

UML Association withmultiplicity

UMLclass

Page 11: Requirement Specification Domain Model

Generalisation

Used when there are some common attributes shared by several classes (it is implemented as inheritance)

11

Page 12: Requirement Specification Domain Model

Aggregation

Used when there is a stronger relation between two classes than association can express

12

Page 13: Requirement Specification Domain Model

Patterns

A pattern is defined as a generic solution to a problem often encountered in the real world

Not a theoretical solutionBased on empirical data and what works

When we construct a domain model then we will often use patternsNext time we will look at several patterns

13