From 4bfbc29c7ea0b711f96346deb25dde0b2298ecde Mon Sep 17 00:00:00 2001 From: Julian T Date: Tue, 15 Sep 2020 18:51:31 +0200 Subject: Added more oop assignments --- sem5/oop/m4/shapes/src/Shape2d.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sem5/oop/m4/shapes/src/Shape2d.java (limited to 'sem5/oop/m4/shapes/src/Shape2d.java') diff --git a/sem5/oop/m4/shapes/src/Shape2d.java b/sem5/oop/m4/shapes/src/Shape2d.java new file mode 100644 index 0000000..09767fa --- /dev/null +++ b/sem5/oop/m4/shapes/src/Shape2d.java @@ -0,0 +1,13 @@ + +public interface Shape2d { + /** + * Calculates the area of the 2d shape. + * @return Area in UNIT^2 + */ + public double area(); + /** + * Returns the perimeter around the shape. + * @return Perimeter in UNIT + */ + public double perimeter(); +} -- cgit v1.2.3