Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. # include "header.h"
  2. # include "ThreeD_Shape.h"
  3.  
  4. class Sphere: public ThreeD_Shape
  5. {
  6.     int x2,y2,z2;
  7. public:
  8.     Sphere(int x1,int y1, int z1, int x2,int y2,int z2): ThreeD_Shape(x1,y1,z1)
  9.     {
  10.         this->x2=x2;
  11.         this->y2=y2;
  12.         this->z2=z2;
  13.     };
  14.     double S();
  15.     double V();
  16.     void print();
  17. };
  18.  
  19. # ifndef THEED_SHAPE
  20. # define THREED_SHAPE
  21. # include "header.h"
  22.  
  23. class ThreeD_Shape: public Shape
  24. {
  25. protected:
  26.     int x1,y1,z1;
  27. public:
  28.     ThreeD_Shape(int x1,int y1,int z1)
  29.     {
  30.         this->x1=x1;
  31.         this->y1=y1;
  32.         this->z1=z1;
  33.     }
  34.     virtual void print()=0;
  35.     virtual double S()=0;
  36.     virtual double V()=0;
  37. };
  38.  
  39. # endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement