Skip to content

Instantly share code, notes, and snippets.

@petergi
Created March 10, 2026 17:25
Show Gist options
  • Select an option

  • Save petergi/277075477c32e688f817c8decd111704 to your computer and use it in GitHub Desktop.

Select an option

Save petergi/277075477c32e688f817c8decd111704 to your computer and use it in GitHub Desktop.
classDiagram
    note "From Duck till Zebra"
    Animal <|-- Duck
    note for Duck "can fly
    can swim
    can dive
    can 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()
    }
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment