hello all welcome to wondershare edrawmax in this video we will learn about class diagrams when designing a system or software developers will often use class diagrams to map out what the system will look like in static form these diagrams allow them to figure out what classes they need their functionality and their relationships with other system elements namely other classes operations attributes and objects benefits of class diagrams class diagrams are simple fast to read and give a sense of orientation they are the foundation for creating systems they provide detailed insight into the structure of your systems create complete charts that highlight specific code needed to be programmed and executed to the defined structure provide an implementation independent explanation of types used in a system that is later passed on to its components class diagram notations class notation a class symbolizes a concept which encapsulates state and behavior as you can see we've drawn two different classes one with the signature and one without let's look into more details regarding the class structure class name the name of the class is always shown in the first section it is mandatory information class attributes attributes are shown in the second section the attribute type is shown after the colon attributes are values that define a class class operations class operations or methods operations are shown in the third section they are services the class provides the return type of method is shown after the colon at the end of the method signature the return type of method parameters are shown after the colon following the parameter name operations map onto class methods in code class visibility the symbols before an attribute and operation name in a class denote the visibility of the attribute and operation visibility symbols are used to determine the accessibility of the information contained in classes plus denotes public attributes or operations minus denotes private attributes or operations pound or hashtag denotes protected attributes or operations and there are a few more symbols that are not shown here and they are a tilde denotes package attributes or operations forward slash denotes derived attributes static attributes or operations are underlined relationships between classes bidirectional association a bilateral association is represented by a straight line connecting two classes it simply demonstrates that the classes are aware of their relationship with each other inheritance indicates a child-parent relationship between classes the child class is a specialized subclass of the parent realization one class implements the behavior specified by another class dependency as the name suggests one class depends on another a dashed arrow shows this aggregation this represents a unilateral relationship between classes one class is part of or subordinate to another in this instance the child and parent classes can exist independently composition it is a form of aggregation where one class is dependent on another one class is part of the other in this instance the child classes and parent classes cannot exist independently now let's learn how to draw a class diagram step 1 identify the class names the first step is to identify the primary objects of the system step 2 distinguish relationships the next step is to determine how each of the classes or objects are related to one another look out for commonalities and abstractions among them this will help you when grouping them when drawing the class diagram step 3 create the structure first add the class names and link them with the appropriate connectors you can add attributes and functions methods or operations later navigate to file click on new select software and database from the categories and software development from the subcategories and now choose uml modeling click on the plus icon to open a new drawing sheet [Music] uml class diagram library most of the symbols related to the class diagram can be found here start building the drawing by just dragging and dropping the required shape onto the drawing pane and change the name accordingly [Music] now let's add classes and provide class names adding attributes and operations [Music] continue to build the diagram as shown [Music] do [Music] [Music] [Music] [Music] now let's add relationship symbols between classes [Music] here exactly one instance of customer is associated with zero or more orders [Music] do [Music] do [Music] to add text select the text option under the home tab [Music] to fill in the colors click on theme on the right side of the page and select the required theme select fit to drawing under the page layout tab and click on the from current page icon under the view tab let's look into a few elements of the diagram class is a blueprint for an object attributes are values that define a class association symbolizes the relationship between classes multiplicity is used to determine how many times an attribute occurs operations describe how a class interacts with data aggregation represents a unilateral relationship between classes role model the instances of classes in more detail an abstract class is a template definition of methods and variables of a class that contains one or more abstracted methods a generalization relationship is a relationship in which one model element the child is based on another model element the parent now let's see a few examples of class diagrams that are available in edraw max here's a java api uml class diagram and this is a domain model uml class diagram thanks for watching and don't forget to subscribe to our channel for more videos please find the link in the description below to try e-draw max online or to download the software