Commit e37f8e85 authored by austin.blanke's avatar austin.blanke

Almost done rectangle

parent 89aec285
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
public class Rectangle extends Shape {
int width;
int height;
public Rectangle() {
width = 3;
height = 4;
}
public Rectangle(int i, int j) {
width = i;
height = j;
}
@Override
public void draw() {
}
@Override
public float area() {
float area = height * width;
return area;
}
@Override
public float circumference() {
float circumference = (2 * height) + (2 * width);
return circumference;
}
public int getWidth() {
return width;
}
public void setWidth(int w) {
width = w;
}
public int getHeight() {
return height;
}
public void setHeight(int h) {
height = h;
}
@Override
public void draw(){
}
}
No preview for this file type
......@@ -17,4 +17,5 @@ abstract public class Shape {
this.size = size;
}
}
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment