Hands-On: Creating Diagrams with StarUML

Introduction: Visual Thinking with StarUML

StarUML is a powerful and elegant tool for designing software systems using UML. Whether you're modeling your first class diagram or preparing architectural documentation, StarUML provides a fast, intuitive interface that helps you bring your ideas to life.

This hands-on tutorial walks you through creating various UML diagrams using StarUML — including use case, class, sequence, and activity diagrams — all through simple, relatable examples like students, teachers, and grades.

Installing and Setting Up StarUML

  1. Visit staruml.io and download the latest version for your OS.
  2. Install the application and launch it.
  3. Click on File → New to start a new project.

StarUML starts with a blank canvas. You’ll see a Model Explorer on the left and a diagram area on the right.

StarUML Interface Overview

Creating a Use Case Diagram

Let’s begin by modeling a school grading system where:

  • Students can view marks
  • Teachers can assign grades
  • Admins can manage users

Steps

  1. Right-click the project in the Model ExplorerAdd Diagram → Use Case Diagram
  2. Drag an Actor to the canvas. Name it “Student”.
  3. Drag a Use Case and name it “View Marks”.
  4. Connect the Student actor to the use case using the Association tool.
  5. Repeat for “Teacher” and “Admin” actors with respective use cases.
Use Case Diagram in StarUML

This diagram gives a bird’s-eye view of system functionality from the user’s perspective.

Creating a Class Diagram

Next, let’s represent the object structure behind this use case.

We’ll model these Java-style classes:


class Student {
    String name;
    List grades;
}

class Grade {
    String subject;
    int score;
}

class Teacher {
    String name;
    void assignGrade(Student s, Grade g);
}

Steps

  1. Right-click project → Add Diagram → Class Diagram
  2. Use the Class tool to place three classes: Student, Teacher, Grade
  3. Double-click each class to add attributes and operations
  4. Use Association or Aggregation lines to show relationships
Class Diagram in StarUML

Tip: StarUML allows you to specify multiplicity (like 1..*, 0..1) by clicking on the association line and editing its properties.

Creating a Sequence Diagram

Sequence diagrams help visualize the order of interactions over time. We’ll model a scenario where a teacher assigns a grade to a student.

Steps

  1. Right-click project → Add Diagram → Sequence Diagram
  2. Drag Lifeline elements for Teacher, Student, and GradeService
  3. Use the Message tool to show method calls:
    • Teacher → GradeService: assignGrade(Student, Grade)
    • GradeService → Student: addGrade(Grade)
Sequence Diagram in StarUML

Adjust the activation boxes and message arrows for clarity. This diagram clarifies timing and dependencies in your system.

Creating an Activity Diagram

Activity diagrams model workflows — perfect for representing the grading process from a student’s perspective.

We’ll model: Student logs in → views grades → logs out

Steps

  1. Right-click project → Add Diagram → Activity Diagram
  2. Add Initial Node, Final Node, and Activities like:
    • Authenticate
    • Fetch Grades
    • Display Grades
  3. Use Control Flows (arrows) to connect the actions
Activity Diagram in StarUML

This helps model logic from the user’s perspective without diving into code.

Bonus: Exporting and Sharing Diagrams

Once your diagrams are done, you can export them as images or PDFs for documentation, code reviews, or presentations.

  1. Go to File → Export Diagram As → PNG/SVG/PDF
  2. Choose your destination folder and save

These assets are perfect for sharing with stakeholders or embedding into design documents.

Tips for Working Efficiently in StarUML

  • Use the Model Explorer: Navigate and organize diagrams, classes, and packages easily
  • Group by package: Keep related diagrams together under functional modules
  • Use keyboard shortcuts: Speeds up frequent tasks like adding classes (press C) or associations (press A)
  • Zoom and layout options: Use the layout toolbar for alignment and zoom-to-fit

Common Mistakes to Avoid

  • 🚫 Avoid mixing too many diagram types in a single canvas
  • 🚫 Don’t over-model — focus on what supports development
  • ✅ Always add meaningful class names and relationships
  • ✅ Validate your design with peers before coding

Conclusion: Designing with Confidence

StarUML isn't just a drawing tool — it’s a thinking partner. When you use it hands-on to create real UML diagrams, you engage in deliberate design. Whether you're building student portals, teacher dashboards, or something entirely different, StarUML helps you move from rough ideas to structured systems with clarity and speed.

Make modeling a part of your development rhythm. Start small. Iterate. Share. And let StarUML give shape to your software stories — diagram by diagram.

QUIZ

Question 1:In StarUML, which action is used to start a new class diagram?

Question 2:StarUML automatically generates code as you draw diagrams.

Question 3:Which types of UML diagrams can you create using StarUML?

Question 4:Where do you go to customize the appearance (colors, fonts) of UML elements in StarUML?

Question 5:In StarUML, you can drag a class from the model explorer into multiple diagrams.

Question 6:While modeling in StarUML, what options are typically available when right-clicking on a class element?

Question 7:What is the recommended file extension when saving a StarUML project?

Question 8:StarUML allows exporting diagrams to image formats like PNG or SVG.

Question 9:To create an association between two classes in StarUML, what is the correct step?

Question 10:Which of the following can be generated using StarUML's code generation feature?