#include <iostream>
#include<cmath>
using namespace std;
class Rectangle2D {
public:
double x;
double y;
double width;
double height;
Rectangle2D() {
x = 0;
y = 0;
width = 1;
height = 1;
}
Rectangle2D(double x, double y,double height, double width) {
this->x = x;
this->y = y;
this->width = width;
this->height = height;
}
void setX(double x) {
this->x = x;
}
void setY(double y) {
this->y = y;
}
double getX() {
return x;
}
double getY() {
return y;
}
void setWidth(double width) {
this
C++程序设计Rectangle2D类
最新推荐文章于 2024-04-26 20:10:37 发布