Advertisement
alvsjo

circle.cpp

Nov 10th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #include "circle.h"
  2.  
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. Circle::Circle()
  8. {
  9. this->X=0;
  10. this->Y=0;
  11. this->radius=0;
  12. cout << "Circle 0 arg" <<endl;
  13.  
  14.  
  15. }
  16.  
  17. /*Circle::Circle(float x,float y, float r)
  18. {
  19.     this->X=x;
  20. this->Y=y;
  21. this->radius=r;
  22.  
  23. cout << "Circle 3arg" <<endl;
  24.  
  25. }*/
  26.  
  27. Circle::Circle(float x,float y, float r) :Point(x,y)
  28. {
  29.  
  30. this->radius=r;
  31.  
  32. cout << "Circle p+1 arg" <<endl;
  33.  
  34. }
  35.  
  36. void Circle::print()
  37. {
  38.  
  39.     Point::print();
  40.  
  41.   //  cout << "X="<< this->X<< endl;
  42.  
  43.     cout <<"R= "<< this->radius<< endl;
  44. }
  45.  
  46. Circle::~Circle()
  47. {
  48.     cout << "des"<< endl;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement