You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
266 B
12 lines
266 B
package w4;
|
|
public class Rectangle extends Shape {
|
|
private double wide;
|
|
private double high;
|
|
public Rectangle(double wide,double high){
|
|
this.wide=wide;
|
|
this.high=high;
|
|
}
|
|
public double getArea(){
|
|
return wide*high;
|
|
}
|
|
}
|
|
|