aboutsummaryrefslogtreecommitdiff
path: root/sem5/oop/m4/shapes/src/Shape2d.java
diff options
context:
space:
mode:
Diffstat (limited to 'sem5/oop/m4/shapes/src/Shape2d.java')
-rw-r--r--sem5/oop/m4/shapes/src/Shape2d.java13
1 files changed, 13 insertions, 0 deletions
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();
+}