1.2.7 Creating a Class Diagram in Violet

Plan the Classes Before Using the Tool

Violet records the model.

It does not decide which classes or fields belong in the design.

Before opening the editor, identify:

A small soccer design might use:

Plain text
Player
Team

Create the Correct Diagram Type

Open Violet and create the class-diagram type used by your course.

Do not begin from an object diagram and try to force it into a class diagram.

The two diagram types represent different information.

Add One Class at a Time

Create the first class and give it the exact class name required by the design.

For example:

Plain text
Player

Then add its fields:

Plain text
name : string
jerseyNumber : int
isAvailable : bool

Keep field names and types consistent with the design.

Add Related Classes

Create:

Plain text
Team

with its required fields.

If the design says Player and Team are related, add the appropriate relationship connection supported by the current course notation.

The diagram should make the structural connection visible without adding future UML detail.

Arrange the Diagram for Reading

A reader should be able to identify:

Avoid crossing lines and cramped text when a simple rearrangement improves clarity.

Visual cleanliness should support meaning.

Save the Editable Violet File

Use the required filename and location.

The editable Violet file is the source diagram.

An image or screenshot may help with viewing, but it does not replace the editable file when later revision is required.

Read the Finished Model Back into Words

For example:

A Player can contain a name, jersey number, and availability state. A Team contains its own fields. Player and Team are structurally related.

If the diagram tells a different story, revise the diagram.

The model should be understandable even before it is translated into C#.