UML: Class diagrams - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

UML: Class diagrams

Description:

UML: Class diagrams Intended learning outcomes Define structural (static) models Implement modelling methodology Identify and use standard UML notation for structural ... – PowerPoint PPT presentation

Number of Views:218
Avg rating:3.0/5.0
Slides: 28
Provided by: systema258
Category:

less

Transcript and Presenter's Notes

Title: UML: Class diagrams


1
UML Class diagrams
2
Intended learning outcomes
  • Define structural (static) models
  • Implement modelling methodology
  • Identify and use standard UML notation for
    structural modelling
  • Create simple class diagrams
  • Identify opportunities for refinement

3
Where we are
  • Develop System Request
  • Understand As-Is system
  • Identify improvement opportunities
  • Develop the To-Be system concept
  • Develop Use Cases
  • Develop Structural Model
  • The Class Diagram

4
Structural Modeling
5
Key Ideas
  • A structural (static) or conceptual model
    describes the structure of the data that supports
    the business processes in an organization.
  • The structure of data used in the system is
    represented through CRC cards, class diagrams,
    and object diagrams.

6
Elements of a CRC card
7
STRUCTURAL MODELS
8
Purpose of Structural Models
  • Reduce the semantic gap between the real world
    and the world of software
  • Create a vocabulary for analysts and users
  • Represent things, ideas, and concepts of
    importance in the application domain

9
Classes
  • Templates for creating instances or objects
  • Concrete
  • Abstract
  • Typical examples
  • Application domain, user interface, data
    structure, file structure, operating environment,
    document, and multimedia classes

10
Attributes
  • Units of information relevant to the description
    of the class
  • Only attributes important to the task should be
    included

11
Operations
  • Action that instances/objects can take
  • Focus on relevant problem-specific operations (at
    this point)

12
Relationships
  • Generalization
  • Enables inheritance of attributes and operations
  • Aggregation
  • Relates parts to wholes
  • Association
  • Miscellaneous relationships between classes

13
CLASS DIAGRAMS

14
Example Conceptual Class Diagram
15
Class Diagram Syntax
16
The Class Diagram
  • Use of Natural Language
  • Discard inappropriate candidates
  • From the nouns in the problem statement
  • Eliminate the
  • redundant
  • irrelevant - those unrelated to the problem
  • Vague - ill-defined boundary, very broad in scope
  • attributes - things that describe an object
  • operations - things that manipulate objects
  • implementation constructs - extraneous to real
    world must be eliminated from analysis model,
    needed during design, but not now.

17
Example problem statement for library automation
system
  • Design the software to support the operation of a
    public library or group of libraries. The system
    has a number of stations and PCs for customer
    transactions. These stations are operated by
    library employees. When a book is borrowed, the
    identification card of the client is read. Next,
    the stations barcode reader reads the books
    code. When a book is returned, the identification
    card is not needed and only the books code needs
    to be read.

18
Object modelling identifying classes
  • Library automation system potential object list

19
Object modelling keeping the right classes
  • Object
  • Elimination reason


20
Object Modeling - The Good Classes
21
Object modelling data dictionary
  • Prepare a data dictionary/ description of each
    class
  • Station a terminal linked to a central computer
    operated by employees with a barcode reader.

22
Identify Associations
  • Associations correspond to verbs in the problem
    statement
  • Association any dependency between two classes
  • From the problem statement
  • Employee operates station
  • From tacit knowledge
  • Library owns computer

23
Initial class diagram
24
Further Specify the semantics of associations
  • Include Multiplicity
  • Qualifier or Qualified Associations
  • Usually a name identifies an object within some
    context most names are not globally unique. The
    context combines with the name to uniquely
    identify the object.
  • A Qualifier distinguishes objects on the many
    side of an association. For example, a qualifier
    bankcode could be added to distinguish the
    different banks in a consortium. Each cash card
    needs a bank code so that transactions can be
    directed to the appropriate bank.

25
Identifying Attributes and operations
  • Attributes
  • Properties of an individual object
  • Usually possessive phrases e.g. the colour of the
    car
  • Identify from the problem description and domain
    knowledge
  • Operations
  • Define ways in which objects interact

26
Identifying attributes
27
Summary
  • Class and object diagrams show the underlying
    structure of an object-oriented system.
  • Constructing the structural model is an iterative
    process involving textual analysis,
    brainstorming objects, role playing, creating the
    diagrams, and incorporating useful patterns.
Write a Comment
User Comments (0)
About PowerShow.com