adms-bis bouwkundige informatiesystemen adms 2006 uml part 2 jan dijkstra - 23 oktober 2006

Download ADMS-BIS Bouwkundige Informatiesystemen ADMS 2006 UML part 2 Jan Dijkstra - 23 oktober 2006

Post on 21-Dec-2015

213 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Slide 1
  • ADMS-BIS Bouwkundige Informatiesystemen ADMS 2006 UML part 2 Jan Dijkstra - 23 oktober 2006
  • Slide 2
  • ADMS-BIS Subjects
  • Slide 3
  • ADMS-BIS UML Models, Views and Diagrams A diagram is a view into a model presented from the aspect of a particular stakeholder and provides a partial representation of the system
  • Slide 4
  • ADMS-BIS UML Views Design view Interaction view Implementa- tion view Deployment view Use Case view vocabulary functionality behaviour performance scalability throughput system assembly configuration management system topology distribution delivery installation physicallogical Design view Interaction view Implementa- tion view Deployment view Use Case view
  • Slide 5
  • ADMS-BIS UML Diagrams Structure diagram Class diagram Object diagram Component diagram Composite structure diagram Deployment diagram Artifact diagram Behaviour diagram Use Case diagram Sequence diagram Communication diagram State diagram Activity diagram
  • Slide 6
  • ADMS-BIS Use Case diagram
  • Slide 7
  • ADMS-BIS Classes/objects course management
  • Slide 8
  • ADMS-BIS UML Class Diagrams The class diagram provides a static structure of all the classes that exist within the system. Classes are arranged in hierarchies sharing common structure and behaviour and are associated with other classes. Class diagrams are used in: Analysis To build a conceptual domain model with semantic associations between concepts
  • Slide 9
  • ADMS-BIS Class Diagram: associations between classes
  • Slide 10
  • ADMS-BIS Classes and Objects object is described by a class An object is described by a class. A class may define a number of objects with identical properties
  • Slide 11
  • ADMS-BIS Object Diagram: links between objects
  • Slide 12
  • ADMS-BIS Class diagram A class diagram describes the type of objects in a system and the static relationships between them. Static relations: Associations Subtypes Static structure: Attributes Operations
  • Slide 13
  • ADMS-BIS Class A class is a set of objects that share the same properties. Name
  • Slide 14
  • ADMS-BIS Class A class is a set of objects that share the same properties. A class has a name. Course
  • Slide 15
  • ADMS-BIS Class - attributes The class captures the abstraction of properties in the set of objects. Name Attributes
  • Slide 16
  • ADMS-BIS Class - attributes An attribute of a class is identified by name, and it identifies a property of the objects of the class, for which each object takes a value. A class has 0 to n attributes. Course courseNum: Integer title: String datum: Date
  • Slide 17
  • ADMS-BIS Class - operations OrderAttributesOperations Operations are the processes that a class knows to carry out.
  • Slide 18
  • ADMS-BIS Class - operations The operations are the responsibilities the things we can ask an object to do. A class has 0 to n operations. Course courseNum: Integer title: String datum: Date addReservation() cancel()
  • Slide 19
  • ADMS-BIS UML Class Diagrams Class diagrams are used in: Analysis To build a conceptual domain model with semantic associations between concepts Design Structural model of a design in terms of class interfaces Implementation Source code documentation, exposing the implementation The class diagram provides a static structure of all the classes that exist within the system. Classes are arranged in hierarchies sharing common structure and behaviour and are associated with other classes.
  • Slide 20
  • ADMS-BIS Classes and Objects Objects looks like modules in some ways Object = Identity + State + Behaviour Objects provide encapsulation of data object is described by a classAn object is described by a class. A class may define a number of objects with identical properties
  • Slide 21
  • ADMS-BIS About an Object operationsAn object has a public interface defining the operations (methods) it will support attributesAn object has private data called attributes, which only its own operations can access An object can have private operations for its own use associationsAn object may know about other objects by means of associations
  • Slide 22
  • ADMS-BIS Classes - recapitulation A class is simply represented as a box with the name of the class inside The diagram may also show the attributes and operations Rectangle height width Rectangle height width getArea resize Rectangle height: int width: int getArea(): int resize(int,int) The complete signature of an operation is: operationName(parameterName: parameterType ): returnType
  • Slide 23
  • ADMS-BIS
  • Slide 24
  • Essentials of UML Class Diagrams recapitulation The main symbols shown on class diagrams are: Classes Represent the types of data themselves Associations Represent linkages between instances of classes Attributes Are simple data found in classes and their instances Operations Represent the functions performed by the classes and their instances Generalizations Group classes into inheritance hierarchies
  • Slide 25
  • ADMS-BIS
  • Slide 26
  • Identifying objects ? A possible recipe We can identify objects in our problem context by looking for nouns and noun phrases Each of these can be underlined and becomes a candidate for an object in our solution Eliminate irrelevant objects Redundant, vague, event, outside scope, attribute, meta- language
  • Slide 27
  • ADMS-BIS The Bank Account Example You are asked to design a system to handle current and savings accounts for a bank. Accounts are assigned to one or more customers, who may make deposits or withdraw money. Each type of account earns interest on the current balance held in it. Current accounts may have negative balances (overdrafts) and then interest is deducted. Rates of interest are different for each type of account. On a savings account, there is a maximum amount that can be withdrawn in one transaction. Bank employees may check any account that is held at their branch. They are responsible for invoking the addition of interest and for issuing statements at the correct times. A money transfer is a short lived record of an amount which has been debited from one account and has to be credited to another. A customer may create such a transfer from their account to any other. Transfers within a branch happen immediately, while those between branches take three days.
  • Slide 28
  • ADMS-BIS The Bank Account Example You are asked to design a system to handle current and savings accounts for a bank. Accounts are assigned to one or more customers, who may make deposits or withdraw money. Each type of account earns interest on the current balance held in it. Current accounts may have negative balances (overdrafts) and then interest is deducted. Rates of interest are different for each type of account. On a savings account, there is a maximum amount that can be withdrawn in one transaction. Bank employees may check any account that is held at their branch. They are responsible for invoking the addition of interest and for issuing statements at the correct times. A money transfer is a short lived record of an amount which has been debited from one account and has to be credited to another. A customer may create such a transfer from their account to any other. Transfers within a branch happen immediately, while those between branches take three days. Question ? Recognize the nouns!
  • Slide 29
  • ADMS-BIS You are asked to design a system to handle current and savings accounts for a bank. Accounts are assigned to one or more customers, who may make deposits or withdraw money. Each type of account earns interest on the current balance held in it. Current accounts may have negative balances (overdrafts) and then interest is deducted. Rates of interest are different for each type of account. On a savings account, there is a maximum amount that can be withdrawn in one transaction. Bank employees may check any account that is held at their branch. They are responsible for invoking the addition of interest and for issuing statements at the correct times. A money transfer is a short lived record of an amount which has been debited from one account and has to be credited to another. A customer may create such a transfer from their account to any other. Transfers within a branch happen immediately, while those between branches take three days. Nouns in the bank account example
  • Slide 30
  • ADMS-BIS Redundant Redundant - overdraft, account Vague Vague - amount, money An event or an operation An event or an operation - transaction, deposit Outside scope of system Outside scope of system - bank, days An attribute An attribute - interest, rate of interest, maximum amount, current balance, overdraft Meta-language Meta-language - transaction, correct times, record Nouns eliminated
  • Slide 31
  • ADMS-BIS Nouns left current account, savings account, customer, branch, statement, transfer Remark: The Bank Account is derived from Pauline Wilcox The Unified Modelling Language in Msc in Systems Level Integration Systems Partitioning Module
  • Slide 32
  • ADMS-BIS Class Diagram (without adornments) bank account example current accou

Recommended

View more >