Advertisement
dusanrs

radnik.hpp

Dec 16th, 2021 (edited)
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #ifndef RADNIK_HPP_INCLUDED
  2. #define RADNIK_HPP_INCLUDED
  3. #include "dinstring.hpp"
  4.  
  5. class Radnik{
  6. protected:
  7.    DinString ime,prezime,jmbg;
  8. public:
  9.     Radnik(){
  10.         this->ime="";
  11.         this->prezime="";
  12.         this->jmbg="";
  13.     }
  14.     Radnik(const DinString &ds1,const DinString &ds2,const DinString &ds3) : ime(ds1),prezime(ds2),jmbg(ds3){}
  15.     Radnik(const Radnik &rd1) : ime(rd1.ime),prezime(rd1.prezime),jmbg(rd1.jmbg){}
  16.  
  17.     virtual void ispis() const{
  18.         cout<<"Ime:"<<this->ime<<endl;
  19.         cout<<"Prezime:"<<this->prezime<<endl;
  20.         cout<<"JMBG:"<<this->jmbg<<endl;
  21.     }
  22.  
  23.  
  24.  
  25. };
  26.  
  27.  
  28. #endif // RADNIK_HPP_INCLUDED
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement