Advertisement
stirante

nagłówki

Sep 14th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. //SEGMENT
  2. #ifndef SEGMENT_H
  3. #define SEGMENT_H
  4.  
  5. #include<string>
  6.  
  7. class Segment
  8. {
  9. public:
  10.     Segment();
  11.     virtual double pole() = 0;
  12.     virtual double obwod() = 0;
  13.     virtual std::string typ() = 0;
  14. };
  15.  
  16. #endif
  17.  
  18. //TROJKAT
  19. #ifndef TROJKAT_H
  20. #define TROJKAT_H
  21.  
  22. #include "segment.h"
  23.  
  24. class Trojkat : public Segment
  25. {
  26.     double a;
  27.     double b;
  28. public:
  29.     Trojkat(double a, double b);
  30.     double pole();
  31.     double obwod();
  32.     std::string typ();
  33. };
  34.  
  35. #endif
  36.  
  37. //KWADRAT
  38. #ifndef KWADRAT_H
  39. #define KWADRAT_H
  40.  
  41. #include "segment.h"
  42.  
  43. class Kwadrat : public Segment
  44. {
  45.     double a;
  46. public:
  47.     Kwadrat(double a);
  48.     double pole();
  49.     double obwod();
  50.     std::string typ();
  51. };
  52.  
  53. #endif
  54.  
  55.  
  56. //PROSTOKAT
  57. #ifndef PROSTOKAT_H
  58. #define PROSTOKAT_H
  59.  
  60. #include "segment.h"
  61.  
  62. class Prostokat : public Segment
  63. {
  64.     double a;
  65.     double b;
  66. public:
  67.     Prostokat(double a, double b);
  68.     double pole();
  69.     double obwod();
  70.     std::string typ();
  71. };
  72.  
  73. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement