Skip to content

Instantly share code, notes, and snippets.

@tyrcho
Last active January 4, 2024 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyrcho/0508be3b8d3db9f879bb6cf1d998c637 to your computer and use it in GitHub Desktop.
Save tyrcho/0508be3b8d3db9f879bb6cf1d998c637 to your computer and use it in GitHub Desktop.
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
---
title: Animal example
---
classDiagram
    note "From Duck till Zebra"
    Animal <|-- Duck
    note for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"
    Animal <|-- Fish
    Animal <|-- Zebra
    Animal : +int age
    Animal : +String gender
    Animal: +isMammal()
    Animal: +mate()
    class Duck{
        +String beakColor
        +swim()
        +quack()
    }
    class Fish{
        -int sizeInFeet
        -canEat()
    }
    class Zebra{
        +bool is_wild
        +run()
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment