?? rectangle.h
字號:
#include <iostream>
using namespace std;
class Rectangle : public Shape
{
public:
Rectangle(double _width, double _height);
double area();
double girth();
void show();
private:
Rectangle();
double width;
double height;
};
Rectangle::Rectangle(double _width, double _height)
{
width = _width;
height = _height;
}
double Rectangle::area()
{
return width * height;
}
double Rectangle::girth()
{
return (width + height) * 2;
}
void Rectangle::show()
{
Shape::show();
cout<<"Type: Rectangle"<<endl;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -