UML(3)

UML(3)

Class diagram

Visibility

Visibility specifies whether or not the objects of a class can access the attributes and operations of another class.

  • +(public) : Indicates that the attribute or operation is visible to other classes.
  • -(private) : Indicates that the attribute or operation is not visible to other classes.
  • #(protected) : Indicates that the attribute or operation is visible to derived classes.
  • ~ : Indicates that the attribute or operation is not visible to the classes. which are within the same package.

Relationship among classes and objects

  • Association
    • Aggregation : represents an association between 2 classes such that class A is part of class B and class A can exist independently.
      • aggregation
    • Composition : represents an association between 2 classes such that class A contains class B and also controls the lifetime of class B.
      • composition
  • Dependency : represents the semantic relationship between 2 classes such that a change in the attributes and operations of one class affects the attributes and operations of the other class,
    enter image description here
  • Generalization
    generalization
  • Realization
    realization

Types of class

  • Abstract class
  • Parameterized class
  • Factory class
  • Self-linked class

Abstract class

An abstract class is a class that does not have any direct instances.
However, the classed inherited from an abstract class can have direct instances.
An abstract class is used to define the common features and common behavior of a set of subclasses.

Parameterized class

A parameterized class, also called template class, provide a mechanism that enables you to use operations and classes to work with different data type.
A parameterized class consists of type parameters that are unbounded, which means that the data types of the parameters are not defined in the parameterized class.
U can not create the objs of a parameterized class. To use the functions defined in the parameterized class, u need to realize the parameterized class by using classes.

Interface

An interface is a collection of operations that are used to represent the services provided by a class or component.

Compare between static and dynamic modeling

Static Modeling Dynamic Modeling
It represents the static or structural constituents of a software system. Therefore, it is also known as structural modeling. It represents the behaviorof a software system. Therefore, it is also known as behavior modeling.
It includes class and object diagrams It includes interaction, activity, and state diagrams.
It helps in depicting the relationships and dependencies between the consitituents of a system. It helps in expressing and modeling the behavior of a system over a period of time.

Sequence diagram

Sequence diagrams represent an interaction among objects in the form of messages ordered in a sequence by time.

Communication diagram

Communication diagrams represents the interaction among objects in the form of messages.
It is also known as Collaboration diagram.

Event types

Events that act as triggers:

  • Call event
  • Signal event
  • Time event

State diagram

Expansion region, Flow Final and Join Specification

Fork and join

U can use a fork to model parallel flows.
At joins, two or more concurrent flows combine to form a flow.

Architecture modeling

Architecture modeling is used to depict the physical constituents of a software system.

Types of components

  • Deployment components: DLLs,EXEs
  • Work product components: the source dode files and data files
  • Execution components: COM+ objects

Framework VS Pattern ( factory, observer)

Framework : defines the features that are common to similar applications belonging to a particular domain
Pattern : a set of principles and guidelines that provide the standard solution to a given problem.

GRASP: a set of patterns that provides the principles of assigning responsibilities to objects.
GoF patterns are based on open-close priciple, which suggests that the design should be open to extension and close to modification.
GoF are broadly into 3 categorized:

  • Creational
    • Factory
    • Builder
    • Singleton
  • Structural
    • Composite
    • Proxy
    • Decorator
    • Facade
  • Behavioral
    • Chain of Resposibility
    • Command
    • Observer

Quality process (three dimension)

What——Technology: describes the tools required for the software development process and the output generated.
How——Methodology: describes the sequence of actions that need to be performed during the software development process to generate output.
Who——Sociology: describes the human resources ,environmental conditions, and skills required for the software development process.

Process component

  • role
  • Activity
  • Task: atomic
  • Output
  • Iteration

Adjustment factor

Adjustment factor =actual productivity / planned productivity ( 1500/2000=0.75)

FP technology

TUFP(total unadjusted FP) = Sum of Data FPs + Sum of Transaction FPs
TDI (total degree of influence) : 将每个GSC的DI值相加的总和
VAF = TDI 0.01+0.65
AFP =(TUFP + CFP)
VAF (CFP 可以没有)