Srxon05

Atuo.hpp

Feb 7th, 2018
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. #ifndef AUTO_HPP_INCLUDED
  2. #define AUTO_HPP_INCLUDED
  3. #include "masina.hpp"
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8.  
  9. class Auto:protected Masina{
  10. public:
  11.     static int brojInstanci;
  12. Auto(DinString Mark, DinString Modell, double Jacinaa, DinString Gorivoo){
  13. marka=Mark;
  14. model=Modell;
  15. jacina=Jacinaa;
  16. gorivo=Gorivoo;
  17. brojInstanci++;
  18. }
  19. Auto(Auto& a){
  20. marka=a.marka;
  21. model=a.model;
  22. jacina=a.jacina;
  23. gorivo=a.gorivo;
  24. brojInstanci++;
  25. }
  26.  
  27.  DinString  getMarka() const{
  28.     return marka;
  29.     }
  30.      DinString  getModel() const{
  31.     return model;
  32.     }
  33.      DinString  getGorivo() const{
  34.     return gorivo;
  35.     }
  36.      double  getJacina() const{
  37.     return jacina;
  38.     }
  39.      void  setMarka(DinString Marka){
  40.     marka=Marka;
  41.     };
  42.      void setModel(DinString Model){
  43.     model=Model;
  44.     };
  45.      void setGorivo(DinString Gorivo){
  46.     gorivo=Gorivo;
  47.     };
  48.      void setJacina(double Jacina){
  49.     jacina=Jacina;
  50.     }
  51.  
  52.  
  53. };
  54.  
  55. #endif // AUTO_HPP_INCLUDED
Add Comment
Please, Sign In to add comment