PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Elements of a class diagram
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
A class diagram is used for modeling the structure of a system via classes and via relationships between these classes.
The class diagrams are the most common diagrams in the modeling of object-oriented systems.
For example, a diagram can present the management of stocks.
Elements of a class diagram
A class diagram includes the following elements:
  • Class: represents the structures of the application. Each class is divided into four compartments:
    • the name of the class indicates what the class is and not what it does.
    • the attributes of the class give the characteristics of the class.
    • the operations of the class represent the possible actions on the class.
    • Versions 15 and later
      the properties of the class. A property is a specific kind of attribute whose reading or writing is done via a function (getter in reading and setter in writing). Using a function allows you to perform complex operations when reading or writing the characteristic. For example, a class used to model an order form could have a "TotalValue" property accessible in read-only. In this case, getter does not exist and setter browses the list of order elements and calculates the value during the call rather than keeping this value in an attribute.
      New in version 15
      the properties of the class. A property is a specific kind of attribute whose reading or writing is done via a function (getter in reading and setter in writing). Using a function allows you to perform complex operations when reading or writing the characteristic. For example, a class used to model an order form could have a "TotalValue" property accessible in read-only. In this case, getter does not exist and setter browses the list of order elements and calculates the value during the call rather than keeping this value in an attribute.
      the properties of the class. A property is a specific kind of attribute whose reading or writing is done via a function (getter in reading and setter in writing). Using a function allows you to perform complex operations when reading or writing the characteristic. For example, a class used to model an order form could have a "TotalValue" property accessible in read-only. In this case, getter does not exist and setter browses the list of order elements and calculates the value during the call rather than keeping this value in an attribute.
    For example, the Stocks class contains the ListProducts attribute. This class also groups the AddProduct and RemoveProduct operations. These operations can be applied to the instances of the class.
    Note: The UML language defines three visibility levels for the attributes and for the operations:
    • Public: the element is visible to all the other classes.
    • Protected: the element is visible by the class itself and by its subclasses.
    • Private: the element is visible only be the class.
  • Relationship: describes the behavior of classes between themselves. Three types of relationships are available:
    • Association: Structural relationship between classes. For example, the Orders class is linked to the Product and Customer classes. A Customer can place several Orders. An order contains several products. An order must necessarily contain at least one product.
    • Dependency: Use relationship that establishes that the instances of a class are linked to the instances of another element. For example, the Orders class uses the Stocks class: before adding a product to an order, you must check whether this product is found in stocks.
    • Generalization: Relationship between a general class (parent) and a specific class (child) that derives from it. For example, the Sail Boat class and Speed Boat class are derived from the Boat class.
  • Packages: used to divide and organize the representation of the diagram (as the directories organizes the files). Each package can contain classes and relationships.
Via the generation of a class diagram, WINDEV enables you to create the structure of the WINDEV classes used in your application.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment