Class Diagram Samples

Class

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Customer]" >

Simple Association

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Customer]->[Address]" >

Simple Associations

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Customer]->[Address]->[AddressLine]" >

Cardinality

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Customer]1-0..*[Address]" >

Directional Association

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Order]-invoicing >[Address], [Order]-shipping >[Address]" >

Splash of Colour And UTF-8

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[✚ Thing{bg:white}]❶- ✱>[Order {bg:green}]" >

Aggregation

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Company]<>-1>[Location], [Location]+->[Office]" >

Composition

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Company]++-*>[Location]" >

Notes

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Customer]<>1-*>[Order], [Customer]-[note: Aggregate Root {bg:cornsilk}]" >

Inheritance

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Wage]^-[Salaried], [Wage]^-[Contractor]" >

Interface Inheritance

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[<<ITask>>]^-.-[NightlyInvoicingTask]" >

International Characters

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[안녕하세요|हलो;你好;مرحبا]->[Köttbullar {bg:wheat}]" >

Bold and Underline

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[Customer|*bold*;_italic_;not_italic|do_it()]->[Order {bg:orange}]" >

Dependencies

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[HttpContext]uses -.->[Request]" >

Interface

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[<<IDisposable>>;UnitOfWork]" >

Class with Details

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[User|#counter;+Forename;+Surname;+HashedPassword;-Salt|+Login(user,pass);+Logout();+Register()]" >

Something Meaty!

<img src="http://yuml.me/diagram/plain;dir:LR;/class/[note: You can stick notes on diagrams too!{bg:wheat}],[Customer]<>1-orders 0..*>[Order], [Order]++*-*>[LineItem], [Order]-1>[DeliveryMethod], [Order]*-*>[Product], [Category]<->[Product], [DeliveryMethod]^[National], [DeliveryMethod]^[International]" >




Create Your Own Class Diagram