1 / 18

Requirement Specification Domain Model

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 ?

eunice
Télécharger la présentation

Requirement Specification Domain Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Requirement SpecificationDomain Model Domain Model Classes and Objects Association Structure

  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”

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

  4. Domain model • A domain model is the visual representation of conceptual classes • We illustrate it by drawing a UML class diagram: • Domain objects or conceptual classes • Associations between the objects • 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. Example of a conceptual class Customer • 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.dk • …… • Attributes: Name, adress, phone, e-mail Customer Name Adress Phone E-mail

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

  7. "Multiplicity" - Diversity or cardinality

  8. 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: UML class UML Association with multiplicity

  9. Associations names

  10. Multiple associations

  11. A pattern in a domain model • Called the agreement pattern • A customermakes an agreement with regard to some item • Car rental • Customer, rentcontract, the car • Education student, class, subjects • Library borrower, loan, book copy

  12. Relateringsmønstret (relational pattern)En associering har selv nogle egenskaber (data) Den nedersteer den vi typiskanvender. Erogsåbedre at brugeiforbindelse med databaser

  13. Aggregation • Used when there is a stronger relation between two classes than association can express • Here we have the Item-Descriptor pattern

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

  15. Domain model: Role Pattern I Generalization: A Person is either a Student or a Lecturer

  16. Domain model: Role Pattern II Role pattern: A Person can be Student as well as Lecturer at the same time

  17. Composite Pattern – the problem How to model the fact that an item can be composed of other items with different measurement units? A major building market Items has different measurement units -> generalisation An item can be composed of other items i.e. a kitchen -> reflexive aggregation (recursion)

  18. General implementation and example Composite pattern Composite pattern Problem • How to treat composite objects the same way as atomic (simple) objects? Solution • Define classes for both composite and atomic (simple) objects so they implement the same interface

More Related