WINDEV Concepts

122 Part 4: Advanced concept A class diagram includes the following elements: • Class : represents the application structures. Each class is divided into three compartments: • the name of the class indicates what the class is, not what it does. • the attributes of the class determine the class characteristics. • the class operations represent the actions the class can execute. For example, the Inventory class contains the ProductList attribute. This class also groups the AddProduct andDeleteProduct operations. These operations can be applied to the class instances. Remark : UML provides three visibility levels for attributes and operations: • Public : the element is visible to all other classes. • Protected : the element is visible to the class and its subclasses. • Private : the element is visible to the class only. • Relationship : describes how classes interact with each other. There are three types of relationships: • 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 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 Inventory class: before adding a product to an order, you must make sure the product is available in stock. • Generalization : Relationship between a general class (parent) and a specific class (child) that derives from it. For example, the Sail_Boat and Speed_Boat classes are derived from the Boat class. • Package : divide and organize the diagram representation (in the same way that directories organize files). Each package can contain classes and relationships. The generation of a class diagram allows you to create the structure of the WINDEV, WEBDEV and WINDEV Mobile classes used in your application. 2.2 Use case diagram A use case diagram is used to view the behavior of a system in such way that: • the user can understand how to use each element. • the developer can implement these elements. For example, the behavior of a cell phone can be described via a use case diagram. A use case diagram includes the following elements: • Actor : represents the role of the users that interact with the application. For example, a person who works in a bank as a loan manager. If they have an account in the same bank, they will also play the role of customer.

RkJQdWJsaXNoZXIy NDQ0OA==