Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Domain Model Classes and Objects Association Structure Requirement Specification Domain Model."— Presentation transcript:

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

2 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 ? The building blocks are objects binds requirements, design and program together Result: A model showing the problem-domain – we call it Domain Model ” The most important model in OO analysis” 2

3 Requirement Functional Use case: find customer 1.A sales person wants to find information about customer 2.The sales person types the customers id 3.The system returns information about the customer Non functional The system has to be user friendly Clarify information Customer: id, name, address Objects binds requirements, design and programming together 3 3 Design Design of architecture Design of GUI Design of classes Design database Implementation Writing 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; } ….. Test idnameaddress Customer Domain object of class Customer

4 Class, objects, attributes and values Customer is candidateObject of class ”Customer” for a class A class describes a collection of objects of the same attributes, structure, and behaviour pattern 4

5 Domain model A domain model is the visual representation of conceptual classes We illustrate it by drawing a UML class diagram: 1.Domain objects or conceptual classes 2.Associations between the objects 3.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

6 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: ha@eventyr.dkha@eventyr.dk …… Attributes: Name, adress, phone, e-mail Customer Name Adress Phone E-mail Customer

7 A Domain Model The classes are connected - here by an association drawn as the line between the concepts. Nameable of a verb phrase. Start with Capital Add the multiplicity defines how many instances(objects) of a class that can be associated with an instance (object) of another class Ex: a student can be enrolled in none or 1 team Result: A UML class diagram 7

8 Requirement specification. 8 Try to create this one in UMLet

9 "Multiplicity" - Diversity or cardinality 9

10 Association Relation between a number of objects. Association A customer can have more orders at once – an order belongs to one customer only. Drawn as a simple line like this: 10 UML Association with multiplicity UML class

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

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

13 Patterns A pattern is defined as a generic solution to a problem often encountered in the real world Not a theoretical solution Based on empirical data and what works When we construct a domain model then we will often use patterns Next time we will look at several patterns 13


Download ppt "Domain Model Classes and Objects Association Structure Requirement Specification Domain Model."

Similar presentations


Ads by Google