package com.itheima;
public class Rectangle extends Shape{
private int lo;
private int wi;
public void Rectangle()
{
}
public void Rectangle(int l,int w)
{
this.lo=l;
this.wi=w;
}
public void setLoAndwi(int l,int w)
{
this.lo=l;
this.wi=w;
}
public void getLo()
{
System.out.println(this.lo);
}
public void getWi()
{
System.out.println(this.wi);
}
@Override
public double getArea()
{ return this.wi*this.lo;
}
public static void main(String[]args)
{
Rectangle r1=new Rectangle();
r1.setLoAndwi(3,4);
System.out.println("矩形的面积是"+r1.getArea());
}
}