Mermaid Class Diagram with MAIDR
Each class announces its attributes and methods; the To list names what it inherits from or is composed of.
Failed to load Mermaid from CDN. Please check your internet connection.
---
title: Animal example
---
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Pond "1" o-- "*" Duck : lives in
Animal : +int age
Animal : +String gender
Animal : +isMammal() bool
class Duck {
+String beakColor
+swim()
+quack()
}
class Fish {
-int sizeInFeet
-canEat()
}
class Pond
note for Duck "can fly and swim"