Browse Source

上传文件至 'w4/类图'

main
YuWeixia 3 weeks ago
parent
commit
6aa804b8c1
  1. BIN
      w4/类图/屏幕截图 2026-03-28 124033.png
  2. 29
      w4/类图/类图代码

BIN
w4/类图/屏幕截图 2026-03-28 124033.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

29
w4/类图/类图代码

@ -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…
Cancel
Save