UML provides a set of conventions for software engineers creating visual diagrams using UML diagramming software for their systems. An object diagram gives a high-level overview of your system, and it's easy to build with Lucidchart. With an extensive UML shape library, you can customize the look and content of your diagram.
3 minute read
Do you want to create your own UML diagram? Try Lucidchart. It's fast, easy, and totally free.
What is an object diagram in UML?
A UML object diagram represents a specific instance of a class diagram at a certain moment in time. When represented visually, you'll see many similarities to the class diagram.
An object diagram focuses on the attributes of a set of objects and how those objects relate to each other. For instance, in this object diagram below, all three bank accounts tie back to the bank itself. The class titles show the type of accounts (savings, checking, and credit card) that a given customer could have with this particular bank. The class attributes are different for each account type. For example, the credit card object has a credit limit, while the savings and checking accounts have interest rates. To take a closer look at this document, click here.
Object diagrams are not limited to banking use cases, however, as you can easily make an object diagram for family trees, corporate departments, or any other system with interrelated parts.
Object diagram elements
Object diagrams are simple to create: they're made from objects, represented by rectangles, linked together with lines. Take a look at the major elements of an object diagram.
Objects
Objects are instances of a class. For example, if "car" is a class, a 2007 Nissan Altima is an object of a class.
Class titles
Class titles are the specific attributes of a given class. In the family tree object diagram, class titles include the name, gender, and age of the family members. You can list class titles as items on the object or even in the properties of the object itself (such as color).
Class attributes
Class attributes are represented by a rectangle with two tabs that indicates a software element.
Links
Links are the lines that connect two shapes of an object diagram to each other. The corporate object diagram below shows how departments are connected in the traditional organizational chart style.
Do you want to create your own UML diagram? Try Lucidchart. It's fast, easy, and totally free.
Create a UML DiagramObject diagram applications
A developer will find object diagrams useful in many instances. These include:
-
Examining a specific iteration of a general system.
-
Getting a high-level overview of the system you will develop.
-
Testing a class diagram you’ve created for the overall structure of the system, using object diagrams for specific use cases.
Other UML object diagram examples
UML specifications typically don't change when you describe an object diagram in different programming languages. The whole purpose of UML is for developers to plan out software independent of specific platforms. Below are two of the most commonly used types of object diagrams in different programming languages.
Swift diagram
The successor to Objective-C, Swift is a programming language for developing iOS and macOS solutions. Swift is designed to work with the codebase written in Objective-C for Apple products and is the programming language of choice for most Apple marketplace applications. Developers can use Swift to create instances for an iPhone app or other Apple devices.
Java object diagram
There are object diagrams that can be used in UML to describe instances that would ultimately be programmed in Java, and there are diagrams that describe Java objects that have nothing to do with UML. Whether you are looking for the former or the latter, Lucidchart can help you map the structure you need to create. Try it out for yourself.