CSCI 452 Object Oriented Analysis and Design - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

CSCI 452 Object Oriented Analysis and Design

Description:

Only types of entities are shown on a class diagram ... A navigability arrow on an association shows which direction the association can ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 12
Provided by: rg901
Category:

less

Transcript and Presenter's Notes

Title: CSCI 452 Object Oriented Analysis and Design


1
CSCI 452 Object Oriented Analysis and Design
  • Class Diagrams

2
Class Diagram
  • Part of Static Object modeling
  • The diagram specifically shows the entities in
    the system along with each entity's internal
    structure and relationships with other entities
    in the system.
  • Only types of entities are shown on a class
    diagram
  • Example Employee class, not the instance Justin
    Case
  • Used to find out details about the system's coded
    classes or soon-to-be-coded classes, along with
    each class's attributes and methods.
  • Class diagrams are particularly useful for
    business modeling, too.
  • Business analysts can use class diagrams to model
    a business's current assets and resources, such
    as account ledgers, products, or geographic
    hierarchy.

3
(No Transcript)
4
Design Class Diagram
5
Relationships
6
Relationships
  • association -- a relationship between instances
    of the two classes. In a diagram, an association
    is a link connecting two classes.
  • aggregation -- an association in which one class
    belongs to a collection. An aggregation has a
    diamond end pointing to the part containing the
    whole. Order has a collection of OrderDetails.
  • generalization -- an inheritance link indicating
    one class is a superclass of the other. A
    generalization has a triangle pointing to the
    superclass. Payment is a superclass of Cash,
    Check, and Credit.
  • A navigability arrow on an association shows
    which direction the association can be traversed
    or queried.
  • The multiplicity of an association end is the
    number of possible instances of the class
    associated with a single instance of the other end

7
Composition and Aggregation
  • Aggregation Associations in which an object is
    part of a whole
  • Aggregation is denoted by a diamond at the whole
    end
  • Composition a strong association in which the
    part can belong to only one whole -- the part
    cannot exist without the whole
  • Composition is denoted by a filled diamond at the
    whole end

8
Class Information, Visibility, and Scope
  • The class notation is a 3-piece rectangle with
    the class name, attributes, and operations
  • Static members are underlined. Instance members
    are not
  • The operations follow this form
  • ltaccess specifiergt ltnamegt ( ltparameter listgt)
    ltreturn typegt
  • The parameter list shows each parameter type
    preceded by a colon
  • Access specifiers appear in front of each member

9
Dependency and Constraints
  • A dependency is a relation between two classes in
    which a change in one may force changes in the
    other.
  • Dependencies are drawn as dotted lines.
  • Co_op depends on Company.
  • A constraint is a condition that every
    implementation of the design must satisfy
  • Constraints are written in curly braces
  • The constraint on our diagram indicates that a
    Section can be part of a CourseSchedule only if
    it is not canceled

10
Association Class
  • Used to indicate many to many relationships
  • Allows to denote an association as a class

11
Qualified Association
  • Contains a qualifier that is used to select an
    object or objects from a larger set of related
    objects
  • Selection is based on a key
  • Allows to filter the associations
Write a Comment
User Comments (0)
About PowerShow.com