Shape
Jump to navigation
Jump to search
Contents
Motivation
Experience with utilizing fields and implementing interfaces.
Mistakes To Avoid
Warning: Do NOT Parallelize |
Code to Investigate
package shape.core; public interface Shape { double area(); }
Code to Implement
Rectangle
public class Rectangle implements Shape
class: | Rectangle.java | |
methods: | constructor area() getX() getY() getWidth() getHeight() |
|
package: | shape.warmup | |
source folder: | student/src/main/java |
constructor
method: public Rectangle(double x, double y, double width, double height)
(sequential implementation only)
getX()
method: public double getX()
(sequential implementation only)
getY()
method: public double getY()
(sequential implementation only)
getWidth()
method: public double getWidth()
(sequential implementation only)
getHeight()
method: public double getHeight()
(sequential implementation only)
Testing Your Solution
Correctness
class: | ShapeTestSuite.java | |
package: | shape.warmup | |
source folder: | testing/src/test/java |