Srxon05

Kvadrat.hpp

Jan 31st, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #ifndef KVADRAT_HPP_INCLUDED
  2. #define KVADRAT_HPP_INCLUDED
  3. #include <iostream>
  4. #include "pravougaonik.hpp"
  5. using namespace std;
  6.  
  7. class Kvadrat : public Pravougaonik{
  8. public:
  9.     Kvadrat(){a=1;
  10.     b=1;}
  11.     Kvadrat(double c1):Pravougaonik(c1,c1){};
  12.     Kvadrat(const Kvadrat &k1):Pravougaonik((Pravougaonik)k1){};
  13.     void seta(double c1){
  14.     a=c1;
  15.     b=c1;}
  16.     void setb(double b1){
  17.     a=b1;
  18.     b=b1;}
  19. };
  20.  
  21.  
  22. #endif // KVADRAT_HPP_INCLUDED
Add Comment
Please, Sign In to add comment