CSC1109_Tutorials/Week5_Lab/task2/Rectangle.java

13 lines
232 B
Java

package Week5_Lab.task2;
public class Rectangle extends Shape{
public Rectangle(float dim1, float dim2) {
super(dim1, dim2);
}
public float area() {
return dim1 * dim2;
}
}