{"version":"1.0","provider_name":"Go UML Fran\u00e7ais","provider_url":"https:\/\/www.go-uml.com\/fr","author_name":"curtis","author_url":"https:\/\/www.go-uml.com\/fr\/author\/curtis\/","title":"Understanding UML Classes: A Comprehensive Guide - Go UML Fran\u00e7ais","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\" data-secret=\"ka7dkT1va7\"><a href=\"https:\/\/www.go-uml.com\/fr\/understanding-uml-classes-a-comprehensive-guide\/\">Understanding UML Classes: A Comprehensive Guide<\/a><\/blockquote><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/www.go-uml.com\/fr\/understanding-uml-classes-a-comprehensive-guide\/embed\/#?secret=ka7dkT1va7\" width=\"600\" height=\"338\" title=\"\u00ab\u00a0Understanding UML Classes: A Comprehensive Guide\u00a0\u00bb &#8212; Go UML Fran\u00e7ais\" data-secret=\"ka7dkT1va7\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe><script>\n\/*! This file is auto-generated *\/\n!function(d,l){\"use strict\";l.querySelector&&d.addEventListener&&\"undefined\"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!\/[^a-zA-Z0-9]\/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),o=l.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),c=new RegExp(\"^https?:$\",\"i\"),i=0;i<o.length;i++)o[i].style.display=\"none\";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute(\"style\"),\"height\"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):\"link\"===t.message&&(r=new URL(s.getAttribute(\"src\")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener(\"message\",d.wp.receiveEmbedMessage,!1),l.addEventListener(\"DOMContentLoaded\",function(){for(var e,t,s=l.querySelectorAll(\"iframe.wp-embedded-content\"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute(\"data-secret\"))||(t=Math.random().toString(36).substring(2,12),e.src+=\"#?secret=\"+t,e.setAttribute(\"data-secret\",t)),e.contentWindow.postMessage({message:\"ready\",secret:t},\"*\")},!1)))}(window,document);\n<\/script>\n","description":"In the realm of software engineering and object-oriented design, the Unified Modeling Language (UML) serves as a standardized way to visualize the design of a system. One of the fundamental building blocks in UML is the concept of a class. This article will delve into the key concepts of classes in UML, provide examples, and explain their significance in software design. What is a Class in UML? A class in UML is a classifier that describes a set of objects sharing the same features, constraints, and semantics (meaning). It is represented as a solid-outline rectangle containing the class name, and optionally, compartments separated by horizontal lines that contain features or other members of the classifier5. Key Characteristics of a Class Class Name: The name of the class should be centered and in boldface, with the first letter capitalized if the character set supports uppercase. Compartments: A class can have multiple compartments: Name Compartment: Contains the class name. Attribute Compartment: Lists the attributes of the class. Operation Compartment: Lists the operations (methods) of the class. Additional Compartments: May include constraints or other details. Features of a Class The features of a class are its attributes and operations. When a class is shown with three compartments, the middle compartment holds a list of attributes, and the bottom compartment holds a list of operations. Attributes Attributes are the properties of a class. They are represented by instances of properties owned by the class. Attributes can represent navigable ends of binary associations. Objects of a class must contain values for each attribute that is a member of that class, in accordance with the attribute&#8217;s characteristics, such as its type and multiplicity. Operations Operations are the methods or functions that a class can perform. They define the behavior of the class. Operations are listed in the bottom compartment of the class rectangle. Static Features Static features can represent characteristics of the classifier itself rather than its instances. Static features are underlined. There are two semantics for static features: Different Values: Static features may have different values for different featuring classifiers. Same Value: Static features may have the same value for all featuring classifiers. Inheritance of values for static features is permitted but not required by UML 25. Visibility Attributes and operations can be grouped by visibility. Visibility keywords or symbols can be given once for multiple features with the same visibility. For example: Public:\u00a0+ Private:\u00a0- Protected:\u00a0# Structured Classes In UML 2.5, classes became structured, encapsulated, and behavioral by extending encapsulated classifiers and behavioral classifiers. This means any class may have some internal structure and ports. Structured classes support encapsulation (information hiding) through ports, limiting the visibility of classifiers to the scope of the namespace of the containing structured class5. Example of a Structured Class Library Services: This is a structured class encapsulated through the searchPort port. The nesting of classifiers defined within the scope of the structured class limits the visibility of the classifiers to the scope of the namespace of the containing structured class and thus supports encapsulation (information hiding) through ports5. Abstract Classes UML 2.4 mentions abstract classes but provides no definition. We can relate the definition of an abstract classifier to an abstract class. An abstract class is intended to be used by other classifiers (e.g., as the target of generalization relationships). Attempting to create an instance of an abstract class is undefined\u2014some languages may make this action illegal, while others may create a partial instance for testing purposes. The name of an abstract class is shown in italics or using the keyword {abstract} after or below the name5. Example of an Abstract Class SearchRequest: This is an abstract class that cannot be directly instantiated. It exists only for other classes to inherit from and to support reuse of the features declared by it5. Standard Class Stereotypes There are several standard UML stereotypes that apply to classes: Name Description \u00abAuxiliary\u00bb An auxiliary class supports another more central or fundamental class, typically by implementing secondary logic or control flow. It is often used for specifying the secondary business logic or control flow of components during the design phase7. \u00abFocus\u00bb A focus class defines the core logic or control flow for one or more supporting classes. It is used for specifying the core business logic or control flow of components during the design phase7. \u00abImplementationClass\u00bb The implementation of a class in some programming language (e.g., C++, Smalltalk, Java) in which an instance may not have more than one class. This is in contrast to a UML class, for which an instance may have multiple classes at one time and may gain or lose classes over time7. \u00abMetaclass\u00bb A class whose instances are also classes7. \u00abType\u00bb A type class specifies a domain of objects together with the operations applicable to the objects, without defining the physical implementation of those objects. It may have attributes and associations, and behavioral specifications for type operations may be expressed using activity diagrams7. Nonstandard but Routinely Used Class Stereotypes Several nonstandard but routinely used class stereotypes are available in UML tools like IBM Rational Software Architect (RSA) and Sparx Enterprise Architect: Name Description \u00abBoundary\u00bb Represents a system boundary, such as a user interface screen, system interface, or device interface object. It is often used in sequence diagrams to demonstrate user interactions with the system7. \u00abControl\u00bb Used to model the flow of control or some coordination in behavior. Control classes describe the dynamics of the designed system and usually describe some &#8220;business logic&#8221;7. \u00abEntity\u00bb Represents some information or data, usually but not necessarily persistent. Business entities represent &#8220;things,&#8221; items, documents, or information handled by business workers. System entities represent information or data processed by the system7. Class Templates UML classes can be templated or bound. A template class allows for the definition of a class with formal template parameters that can be substituted with actual values when the class is instantiated. Example of a Template Class Array: This is a template class with two formal template parameters. The first parameter"}