在下面程序的横线处填上适当内容,完成类的定义。
class line;
class box
{private:
int color;
int upx, upy;
int lowx, lowy;
public:
____________
void set_color (int c){color=c;}
void define_box (int xl, int yl, int x2, int y2)
{upx=x1;upy=y1;lowx=x2;lowy=y2;}
};
class line
{private:
int color;
int startx, starty;
int endx, endy;
public:
friend int same_color( line 1, box b);
void set_color (int c){color=c;}
void define_line(____________)
{startx =x1;starty =yl;endx =x2;endy =y2;}
};
int same_color( line 1, box b)
{if (1.color =b.color)return 1;
return 0;
}
订单号:
遇到问题请联系在线客服
订单号:
遇到问题请联系在线客服