0.2.13 Creating Object Diagrams in Violet

Begin With the Model, Not the Tool

Violet gives you a way to draw UML object diagrams.

The software can place boxes and connect them with lines, but it cannot decide what your model should mean.

Before you start drawing, identify the snapshot you want to represent.

For a small soccer example, you might decide that the model needs:

Only after that decision should you begin placing elements in Violet.

Create an Object Diagram

Open Violet and create a new UML object diagram using the course-provided diagram type.

You should see a drawing area and the tools available for that diagram.

Use the object-diagram element tool to place the first object in the workspace.

The exact appearance of Violet may vary, but the modeling sequence stays the same:

  1. add the object;
  2. give it an identity and type;
  3. add only the field values needed for the current snapshot;
  4. repeat for other objects;
  5. connect related objects;
  6. arrange the diagram so it can be read clearly.

Build One Object Completely

Suppose your first object represents Jordan.

The intended content is:

player1 : Player

with fields such as:

Enter the identity and type in the form expected by Violet's object element.

Then add the current field/value information.

Do not add fields simply to make the box look complete. Include the values required by the model's purpose.

Add the Related Team

Create a second object:

team1 : Team

with a selected value such as:

name = "Wildcats"

Now you have two specific objects.

Before connecting them, read each object separately and make sure its identity, type, fields, and values communicate what you intended.

Add the Relationship

Use Violet's relationship/link tool for the object diagram to connect the specific player object to the specific team object.

The relationship should connect the objects that are actually related in the modeled snapshot.

Do not draw a line merely because two objects are close to each other or share a similar topic.

A relationship should communicate real model meaning.

In this example:

player1 belongs to team1.

Make the Diagram Easy to Read

A correct diagram can still be difficult to understand if the layout is crowded.

Arrange objects so that:

Do not change the meaning of the model just to make the page symmetrical.

Layout supports meaning; it does not create meaning.

Keep Identity and Values Distinct

A common beginner mistake is to place a display value where the object identity belongs.

Remember:

player1 : Player

identifies the object instance and its type.

name = "Jordan"

is a field/value pair inside that object.

Those two pieces of information should not be treated as interchangeable.

Save the Editable Violet File

Save the diagram using the location and filename required by the course.

The editable Violet file matters because you may need to revise the diagram after receiving feedback.

An image or screenshot can show what the diagram looked like, but it cannot replace the editable source file when the diagram must be corrected.

Save after meaningful changes rather than waiting until the very end.

Reopen Before You Depend on the File

After saving, reopen the diagram at least once.

Confirm that:

This helps separate a modeling problem from a file-management problem.

Use Violet as a Modeling Tool

A productive workflow is:

Decide what the model means → Draw it in Violet → Read the diagram back in plain language → Revise the model if the meaning is unclear

The goal is not to become fast at clicking Violet tools.

The goal is to make your reasoning visible in a UML object diagram that another person can read.