09-09-2013, 04:15 PM
Introduction to Class diagram
Class diagram.doc (Size: 194.5 KB / Downloads: 17)
Class Diagram
A class diagram in the Unified Modeling Language (UML), is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, and the relationships between the classes.
A class diagram is an illustration of the relationships and source code dependencies among classes in the Unified Modeling Language (UML). In this context, a class defines the methods and variables in an object, which is a specific entity in a program or the unit of code representing that entity. Class diagrams are useful in all forms of object-oriented programming (OOP). The concept is several years old but has been refined as OOP modeling paradigms have evolved.
In a class diagram, the classes are arranged in groups that share common characteristics. A class diagram resembles a flowchart in which classes are portrayed as boxes, each box having three rectangles inside. The top rectangle contains the name of the class; the middle rectangle contains the attributes of the class; the lower rectangle contains the methods, also called operations, of the class. Lines, which may have arrows at one or both ends, connect the boxes. These lines define the relationships, also called associations, between the classes.
The UML provide mechanisms to represent class members, such as attributes and methods, and additional information about them. In class diagram each of the entity is represented by the set of attributes and the methods that are encapsulated with in a unit called a class. The class also specified the scope and visibility of the attributes and the method by specifying the access attributes of the members like public, private and protected. In class the members (attributes and methods) can be either the instance (non-static) members or the class (static) members.