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
- Visit staruml.io and download the latest version for your OS.
- Install the application and launch it.
- 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.

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
- Right-click the project in the Model Explorer → Add Diagram → Use Case Diagram
- Drag an Actor to the canvas. Name it “Student”.
- Drag a Use Case and name it “View Marks”.
- Connect the Student actor to the use case using the Association tool.
- Repeat for “Teacher” and “Admin” actors with respective use cases.

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
- Right-click project → Add Diagram → Class Diagram
- Use the Class tool to place three classes: Student, Teacher, Grade
- Double-click each class to add attributes and operations
- Use Association or Aggregation lines to show relationships

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
- Right-click project → Add Diagram → Sequence Diagram
- Drag Lifeline elements for Teacher, Student, and GradeService
- Use the Message tool to show method calls:
Teacher → GradeService: assignGrade(Student, Grade)
GradeService → Student: addGrade(Grade)

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
- Right-click project → Add Diagram → Activity Diagram
- Add Initial Node, Final Node, and Activities like:
- Authenticate
- Fetch Grades
- Display Grades
- Use Control Flows (arrows) to connect the actions

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.
- Go to File → Export Diagram As → PNG/SVG/PDF
- 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 (pressA
) - 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.
Comments
Loading comments...