Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include "shape.h"
  2.  
  3. class Circle : public Shape{
  4. double r;
  5. static constexpr double pi = 3.14159265;
  6. Point p0, p1;
  7. public:
  8. Circle(Point egyik, Point masik): p0(egyik),p1(masik){}
  9. double getArea() const{return r*r*pi;}
  10. void show(std::ostream& os){
  11. os<<"Kor: "<< r;
  12. }
  13. Circle* letrehoz() {
  14. return new Circle(*this);
  15. }
  16. ~Circle(){}
  17. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement