#ifndef C_SHAPE_H
#define C_SHAPE_H
#include <graphics.h>
class c_shape{
protected:
int x;
int y;
int color;
int radius;
public:
//c_shape(int _x, int _y, int _r, int _color);
c_shape();
~c_shape();
virtual void drawMe(int x, int y)=0;
virtual void eraseMe(int x, int y, int backColor)=0;
void moveMe(int x, int y, int backColor);
//get
const int & getX() const;
const int & getY() const;
const int & getColor() const;
const int & getRadius()const;
// set
void setColor(const int & _color);
void setRadius(const int & _radius);
};
c_shape::c_shape(){
//constructor;
}
c_shape:: ~c_shape(){
}
/*
c_shape::c_shape(int _x, int _y, int _r, int _color){
x=_x;
y=_y;
radius=_r;
color=_color;
}*/
void c_shape::moveMe(int x, int y, int backColor){
this->eraseMe(this->x,this->y, backColor);
this->drawMe(x,y);
this->x=x;
this->y=y;
}
const int & c_shape::getX() const{
return x;
}
const int & c_shape::getY() const{
return y;
}
const int & c_shape::getColor() const{
return color;
}
const int & c_shape::getRadius() const{
return radius;
}
void c_shape::setColor(const int& _color){
color=_color;
}
void c_shape::setRadius(const int& _radius){
radius=_radius;
}
#endif
#define C_SHAPE_H
#include <graphics.h>
class c_shape{
protected:
int x;
int y;
int color;
int radius;
public:
//c_shape(int _x, int _y, int _r, int _color);
c_shape();
~c_shape();
virtual void drawMe(int x, int y)=0;
virtual void eraseMe(int x, int y, int backColor)=0;
void moveMe(int x, int y, int backColor);
//get
const int & getX() const;
const int & getY() const;
const int & getColor() const;
const int & getRadius()const;
// set
void setColor(const int & _color);
void setRadius(const int & _radius);
};
c_shape::c_shape(){
//constructor;
}
c_shape:: ~c_shape(){
}
/*
c_shape::c_shape(int _x, int _y, int _r, int _color){
x=_x;
y=_y;
radius=_r;
color=_color;
}*/
void c_shape::moveMe(int x, int y, int backColor){
this->eraseMe(this->x,this->y, backColor);
this->drawMe(x,y);
this->x=x;
this->y=y;
}
const int & c_shape::getX() const{
return x;
}
const int & c_shape::getY() const{
return y;
}
const int & c_shape::getColor() const{
return color;
}
const int & c_shape::getRadius() const{
return radius;
}
void c_shape::setColor(const int& _color){
color=_color;
}
void c_shape::setRadius(const int& _radius){
radius=_radius;
}
#endif
Tinti Titanium Bmx Frame & Brushed Frame - Tinti
ReplyDeleteTiTi Titanium Bmx Frame & titanium key ring Brushed Frame. Tinti Titanium Bmx Frame & Brushed titanium ring Frame. Tinti Titanium titanium wheels Bmx Frame & Brushed titanium properties Frame. Tinti Titanium Bmx Frame & titanium strength Brushed Frame. Tinti Titanium