What is an Object Diagram in UML?

What is an object diagram in UML?

UML provides a set of conventions for software engineers looking to create visual diagrams for their systems. An object diagram creates a high-level overview of your system.

It’s easy to create high-quality object diagrams in Lucidchart. With an extensive UML shape library, you can customize the look and content of your diagram.

Try it now
Sign up free

What is an Object Diagram in UML?

An object diagram is a specialized kind of class diagram. It focus on the attributes of a set of objects and how those objects relate to each other. For instance, in this object diagram, all three bank accounts tie back to the bank itself. The class titles show the kind of accounts (savings, checking, and credit card) that a given customer could have with this particular bank. The class attributes are different for each kind of account. This is illustrated by the credit card object having a credit limit, while the savings and checking accounts have interest rates. Object diagram are not limited to banking use cases. You can make an object diagram for family trees, corporate departments—any system with interrelated parts.

What is an object diagram in UML?

Object Diagram Applications

There are many instances where a developer will find object diagrams useful. 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.

Object Diagram Elements

Object diagrams are simple to create: they're made from objects, represented by rectangles, linked together with lines. These are the major elements of an object diagram:

  • Objects - are instances of a class. If a car is a class, a 2007 Nissan Altima is an object of a class. The objects in the class “Parents” are your specific parents, for instance, Elaine and Gary.
  • Class titles - the specific attributes of the class. In the family tree object diagram, this is the name, gender, and age of the family members. These can be listed as items on the object, or even in the properties of the object itself (such as color).
  • Class attributes - a rectangle with two tabs that indicates a software element.
  • Links - these are the lines connecting one object to another. The corporate object diagram below shows how departments are connected in the traditional organizational chart style.
What is an object diagram in UML?

Lucidchart is the ideal solution for creating UML diagrams, including object diagrams. From the highly technical to the broad, you can build object diagrams from scratch or from a template. Try our browser-based diagramming tool today!

Try it now
Sign up free