📄 rectangle.java
字号:
public class Rectangle
extends Shape
{
protected double width, height;
public Rectangle(double _width, double _height)
{
type = "Rectangle";
width = _width;
height = _height;
}
public void computeArea()
{
area = width * height;
}
public void computePerimeter()
{
perim = 2 * width + 2 * height;
}
public String toString()
{
return super.toString() + "\n\tWidth = " + width + "\n\tHeight = " +
height;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -