2 changed files with 29 additions and 0 deletions
|
After Width: | Height: | Size: 41 KiB |
@ -0,0 +1,29 @@ |
|||
classDiagram |
|||
class Shape { |
|||
<<abstract>> |
|||
+getArea() double* |
|||
} |
|||
class Circle { |
|||
-radius : double |
|||
+Circle(double) |
|||
+getArea() double |
|||
} |
|||
class Rectangle { |
|||
-length : double |
|||
-width : double |
|||
+Rectangle(double, double) |
|||
+getArea() double |
|||
} |
|||
class Triangle { |
|||
-base : double |
|||
-height : double |
|||
+Triangle(double, double) |
|||
+getArea() double |
|||
} |
|||
class ShapeUtil { |
|||
+printArea(Shape) void |
|||
} |
|||
Shape <|-- Circle |
|||
Shape <|-- Rectangle |
|||
Shape <|-- Triangle |
|||
ShapeUtil --> Shape : uses |
|||
Loading…
Reference in new issue