Violet is a UML diagram editor. You choose the kind of diagram, place UML elements on the canvas, edit their labels or properties, connect them, and save the editable diagram file.
If Violet is not installed yet, complete the installation guide first.
When you create a new Violet file, choose the diagram type that matches the question you are trying to answer.
| Diagram | Question it answers | Typical focus |
|---|---|---|
| Object diagram | What objects exist right now, and what values or references do they currently contain? | Runtime instances and current state |
| Class diagram | What kinds of objects can the program create, and what members or relationships define those types? | Program structure |
| Sequence diagram | Which object calls which method, and in what order? | Object interaction over time |
| Activity diagram | What actions and decisions occur in a process? | Control flow and branching |
Most work in Violet follows the same small loop: choose a tool, place an element, return to selection mode, edit the element, arrange the page, and save.
An object diagram is a snapshot of specific object instances at one moment in time. Use it when you need to show which objects exist, the values currently stored in them, and references between those objects.
Create a new Object Diagram. Add an object node for each instance you want to show. Give each object an identity and type using the notation required by the course, then add the current field values that matter to the model.
The example below emphasizes the three questions an object diagram should make easy to answer: which object is this?, what values does it currently contain?, and what other object does it refer to?
The goal is not to model an entire application. Practice creating, editing, connecting, arranging, saving, and reopening a small object diagram.
A class diagram describes types rather than individual runtime objects. Use it to show the classes in a design, the fields and methods each class exposes, and structural relationships between classes.
Create a new Class Diagram. Add one class node for each type you need. Edit the class name first, then add only the fields and methods that the current exercise asks you to depict.
Compare the class definition below with the object-diagram examples above. `Player` describes the type; `player1 : Player` is one instance of that type.
Do not worry yet about reproducing every UML visibility symbol or relationship detail perfectly. The immediate goal is to become comfortable creating and editing class nodes and connectors.
A sequence diagram shows interaction over time. Read it from top to bottom: participants appear across the top, and messages show which participant calls or communicates with another participant and in what order.
Create a new Sequence Diagram. Add the participants first so you know who is involved. Then add messages in execution order from top to bottom.
The example below has three participants and three messages. The vertical position of each message matters: the higher message happens before the lower message.
Save the diagram, close it, and reopen it. Confirm that the participants and message order are still clear without relying on your memory of how you created them.
An activity diagram shows flow through a process. Use it to show actions, decisions, alternate paths, and where a process begins or ends.
Create a new Activity Diagram. Begin with a start node, add actions in the order they can occur, and connect them with flows. Add a decision only when the process can follow different paths based on a condition.
A decision node represents a question. Each outgoing path should make it clear what condition causes that path to be taken.
Before saving, trace the diagram with your finger or mouse from start to finish along both paths. If either path becomes ambiguous, adjust the connectors or labels until the flow is obvious.
For course work, save the editable Violet source file—not merely a screenshot or exported image. You may need to reopen the diagram and revise it after feedback.
You do not need to memorize every Violet tool now. You need enough familiarity that the editor stops being the difficult part. The remaining learning activities will teach the UML notation and modeling decisions in much greater detail.