diff options
author | RossTheRoss <mstrapp@protonmail.com> | 2019-10-16 14:56:08 -0500 |
---|---|---|
committer | RossTheRoss <mstrapp@protonmail.com> | 2019-10-16 14:56:08 -0500 |
commit | 4e15412bd6bbc53bf60dadd1587fff93de2c83b7 (patch) | |
tree | 88e79634f953e9cb62c81599bc646e35abe7435f /csci1913/Java/lab6/lab6_strap012.java | |
parent | Move things around (diff) | |
download | homework-4e15412bd6bbc53bf60dadd1587fff93de2c83b7.tar homework-4e15412bd6bbc53bf60dadd1587fff93de2c83b7.tar.gz homework-4e15412bd6bbc53bf60dadd1587fff93de2c83b7.tar.bz2 homework-4e15412bd6bbc53bf60dadd1587fff93de2c83b7.tar.lz homework-4e15412bd6bbc53bf60dadd1587fff93de2c83b7.tar.xz homework-4e15412bd6bbc53bf60dadd1587fff93de2c83b7.tar.zst homework-4e15412bd6bbc53bf60dadd1587fff93de2c83b7.zip |
Finish lab
Diffstat (limited to 'csci1913/Java/lab6/lab6_strap012.java')
-rw-r--r-- | csci1913/Java/lab6/lab6_strap012.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/csci1913/Java/lab6/lab6_strap012.java b/csci1913/Java/lab6/lab6_strap012.java new file mode 100644 index 0000000..e2c96e4 --- /dev/null +++ b/csci1913/Java/lab6/lab6_strap012.java @@ -0,0 +1,19 @@ +package lab6; + +class Rectangle extends Polygon { + public Rectangle(int l, int w) { + super(4, l, w, l, w); + } + public int area() { + return this.side(0)*this.side(1); + } +} + +class Square extends Polygon { + public Square(int l) { + super(4, l, l, l, l); + } + public int area() { + return this.side(0)*this.side(1); + } +}
\ No newline at end of file |