UML for Object-Oriented Design

The Unified Modeling Language (UML) is a notation you can use for object-oriented design. This article contains a brief overview of UML to introduce you to the subset of UML that you can use to describe classes, interfaces, objectsand the relationships among them.

About UML



UML is a standard maintained by the Object Management Group. UML has its own terminology that is independent of implementation languages such as Java and C#. UML calls pieces of information stored in instances of a class attributes rather than variables. UML calls a class's encapsulations of behavior operations, rather than functions, procedures, methods, or subroutines.

.NET's concept of properties do not directly match anything in UML. If a class has a property named Color, you would draw it in a UML diagram with operations named GetColor and SetColor.



Classes



UML uses a few different kinds of diagrams. This article will focus on class diagrams. A class diagram is a diagram that shows classes, interfaces, objects, and their relationships. The most basic element of a class diagram is a class. Figure 1 shows many of the features that a class can have in a class diagram.


Figure 1: An Example of a Class

Classes are drawn as rectangles. The rectangles may be divided into two or three compartments. The class rectangle shown in Figure 1 has three compartments. The top compartment contains the class's name. The middle compartment lists the class's attributes. The bottom compartment lists the class's operations.

The symbols that precede each attribute and operation are visibility indicators. The possible visibility indicators and their meanings are as follows:



Symbol
Name
Description

+

Public

Unrestricted access

#

Protected

Access only by the containing class or derived types (children)

-

Private

Access restricted to the containing class

Read the Rest of this Article at Developer.com

Regional Articles
- UML for Object-Oriented Design Alabama
- UML for Object-Oriented Design Alaska
- UML for Object-Oriented Design Arizona
- UML for Object-Oriented Design Arkansas
- UML for Object-Oriented Design California
- UML for Object-Oriented Design Colorado
- UML for Object-Oriented Design Connecticut
- UML for Object-Oriented Design DC
- UML for Object-Oriented Design Delaware
- UML for Object-Oriented Design Florida
- UML for Object-Oriented Design Georgia
- UML for Object-Oriented Design Hawaii
- UML for Object-Oriented Design Idaho
- UML for Object-Oriented Design Illinois
- UML for Object-Oriented Design Indiana
- UML for Object-Oriented Design Iowa
- UML for Object-Oriented Design Kansas
- UML for Object-Oriented Design Kentucky
- UML for Object-Oriented Design Louisiana
- UML for Object-Oriented Design Maine
- UML for Object-Oriented Design Maryland
- UML for Object-Oriented Design Massachusetts
- UML for Object-Oriented Design Michigan
- UML for Object-Oriented Design Minnesota
- UML for Object-Oriented Design Mississippi
- UML for Object-Oriented Design Missouri
- UML for Object-Oriented Design Montana
- UML for Object-Oriented Design Nebraska
- UML for Object-Oriented Design Nevada
- UML for Object-Oriented Design New Hampshire
- UML for Object-Oriented Design New Jersey
- UML for Object-Oriented Design New Mexico
- UML for Object-Oriented Design New York
- UML for Object-Oriented Design North Carolina
- UML for Object-Oriented Design North Dakota
- UML for Object-Oriented Design Ohio
- UML for Object-Oriented Design Oklahoma
- UML for Object-Oriented Design Oregon
- UML for Object-Oriented Design Pennsylvania
- UML for Object-Oriented Design Rhode Island
- UML for Object-Oriented Design South Carolina
- UML for Object-Oriented Design South Dakota
- UML for Object-Oriented Design Tennessee
- UML for Object-Oriented Design Texas
- UML for Object-Oriented Design Utah
- UML for Object-Oriented Design Vermont
- UML for Object-Oriented Design Virginia
- UML for Object-Oriented Design Washington
- UML for Object-Oriented Design West Virginia
- UML for Object-Oriented Design Wisconsin
- UML for Object-Oriented Design Wyoming

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML