Architettura Software

UML Class Diagrams: Complete Guide

UML class diagrams: attributes, methods, visibility, association, aggregation, composition, navigability, and state diagrams.

Course description

UML Class Diagrams — The Common Language of Software Design

Before writing a single line of code, complex software systems are designed. UML class diagrams are the standard tool for modeling data structures, relationships between objects, and object-oriented architectures. In this complete 25-episode course, we cover everything — from the simplest class to complex relationships between entities.

What You'll Learn

  • Classes, attributes, methods, and object diagrams
  • Access modifiers, encapsulation, and information hiding
  • Constructors, overloading, and private/public visibility
  • Association relationship: concept, UML representation, and Java implementation
  • Differences between association, aggregation, and composition (with practical examples)
  • Navigability: unidirectional and bidirectional relationships
  • Domain constraints and cardinality reasoned from object state
  • Multiple relationships and complex modeling scenarios
  • State diagrams: introduction and integration with class diagrams

Who This Course Is For

Computer science and engineering students, junior developers, and anyone who wants to learn how to design software systems before implementing them. Class diagrams are used with any OOP language — Java, C#, Python, TypeScript.

The Course Approach

Every concept is explained from a conceptual perspective and then shown in real code. The goal is not to memorize UML symbols, but to develop the reasoning that leads to choosing the right relationship between classes — association vs aggregation vs composition is not an arbitrary choice.

Lessons list

Let's discover what UML is and why class diagrams are the standard tool for designing software systems before writing a single line of code. I'll cover the objectives, main uses, and structure of this course.

Guarda lezione

Let's explore methods and attributes in UML class diagrams and how they relate to the object diagram. These are the two fundamental dimensions for describing a class at the design stage.

Guarda lezione

I'll explore the UML object diagram and its relationship with the class diagram. I'll show you how a concrete instance reflects the structure of the model and why this distinction is essential in OOP design.

Guarda lezione

I'll guide you through methods in UML class diagrams, with a focus on return types and how to define a class's behavior at the design level before writing any code.

Guarda lezione

Let's explore access modifiers in UML and how they implement encapsulation and information hiding in class diagrams, with clear examples on element visibility.

Guarda lezione

I'll show a concrete encapsulation example implemented in Java starting from a UML class diagram. Let's go step by step from the graphical representation to the real code.

Guarda lezione

I'll cover constructors and constructor overloading in UML class diagrams: how they're represented graphically and why they're fundamental to defining how objects are initialized.

Guarda lezione

Let's explore custom methods and the private vs public visibility concept in UML class diagrams, with practical examples showing how visibility choices impact object-oriented design.

Guarda lezione

Let's recap the key concepts covered so far: UML constructors, differences between private and public visibility, and the role of methods in classes. A structured review before moving on to relationships.

Guarda lezione

I'll explore the association relationship in UML class diagrams in depth: what it is, what it represents semantically, when to use it, and how it differs from other types of relationships.

Guarda lezione

I'll show you how a UML association relationship is implemented in Java code: from the graphical representation to a concrete implementation, with examples that translate to other OOP languages.

Guarda lezione

I'll compare association, aggregation, and composition in UML class diagrams from a theoretical perspective, exploring the semantic and conceptual differences between the three relationships — which are not interchangeable.

Guarda lezione

From theory to practical examples: I'll show you how to correctly choose between association, aggregation, and composition in UML class diagrams, with real-world cases that clarify the distinctions.

Guarda lezione

I'll explore the aggregation concept in UML class diagrams and its translation into Java code. I'll explain what distinguishes it from a simple association and when it makes sense to use it.

Guarda lezione

First part dedicated to composition as a strong relationship in UML diagrams. I'll cover its connection to object lifecycle and how to choose it over aggregation based on each class's responsibilities.

Guarda lezione

I'll go deeper into composition in UML diagrams with more complete examples. We'll look at design choices related to object instantiation and the responsibilities of container classes.

Guarda lezione

I'll explain the concept of navigability in UML associations: what it means to make a relationship unidirectional or bidirectional, and how this choice influences both the model and the resulting code.

Guarda lezione

I'll introduce domain constraints in UML class diagrams: what they are, why they're not just graphical details, and how they affect model correctness and data consistency at runtime.

Guarda lezione

I'll walk you through realistic UML modeling scenarios where association and aggregation coexist on the same class, guided by domain constraints that determine the most appropriate relationship choice.

Guarda lezione

I'll go deeper into UML cardinalities beyond simple numeric reading. I'll introduce the concept of state as the key to reasoning about constraints and understanding when a relationship is valid.

Guarda lezione

I'll apply cardinality reasoning to more complex UML cases, showing you how the state of an object influences the validity of relationships and constraints in the model.

Guarda lezione

I'll introduce the state diagram as a complementary tool to the UML class diagram. I'll explain when to use it, how it emerges from domain analysis, and how it connects to the classes in your model.

Guarda lezione

In this second part I'll work through practical UML state diagram examples. We'll explore transitions, events, and conditions together, and see how to integrate state diagrams with class diagrams to enrich the model.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 23
  • Duration 4h 21m
  • Difficulty base
  • Language it
  • Certificate No

Recently viewed