You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
440 B
31 lines
440 B
@startuml
|
|
abstract class Shape {
|
|
{abstract} + getArea(): double
|
|
}
|
|
|
|
class Circle {
|
|
- radius: double
|
|
+ getArea(): double
|
|
}
|
|
|
|
class Rectangle {
|
|
- width: double
|
|
- height: double
|
|
+ getArea(): double
|
|
}
|
|
|
|
class Triangle {
|
|
- base: double
|
|
- height: double
|
|
+ getArea(): double
|
|
}
|
|
|
|
class ShapeUtil {
|
|
+ printArea(Shape): void
|
|
}
|
|
|
|
Shape <|-- Circle
|
|
Shape <|-- Rectangle
|
|
Shape <|-- Triangle
|
|
ShapeUtil ..> Shape
|
|
@enduml
|