consolidate all repos to one for archive
This commit is contained in:
30
semester_2/programiranje_2/primeri/Example34/CPoint.h
Normal file
30
semester_2/programiranje_2/primeri/Example34/CPoint.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef EXAMPLE34_CPOINT_H
|
||||
#define EXAMPLE34_CPOINT_H
|
||||
|
||||
#include <iostream>
|
||||
#include "Point.h"
|
||||
|
||||
class CPoint : public Point {
|
||||
private:
|
||||
int color;
|
||||
public:
|
||||
CPoint() : Point(), color(0) {
|
||||
}
|
||||
CPoint(int x1, int y1, int b) : Point(x1, y1), color(b) {
|
||||
}
|
||||
~CPoint() {
|
||||
}
|
||||
bool equal(Point& p) {
|
||||
std::cout << "Method CPoint::equal(Point)" << std::endl;
|
||||
return true;
|
||||
}
|
||||
bool equal(CPoint& cp) {
|
||||
std::cout << "Method CPoint::equal(CPoint)" << std::endl;
|
||||
if ( (this->x==cp.x) && (this->y == cp.y) && (this->color == cp.color))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EXAMPLE34_CPOINT_H
|
||||
Reference in New Issue
Block a user