Wednesday, May 28, 2014

#6 Osoba.h Include Nasledjivanje

// STS Sombor II4 Bogdanovic D. 2014g
#ifndef OSOBA_H
#define OSOBA_H

// osnovna klasa koja se kasnije nasledjuje
using namespace std;

class c_osoba{
      private:
          string ime;
          string prezime;
          int godiste;
      public:
          c_osoba();
          string getIme();
          string getPrezime();
          int getGodiste();
          void setIme(string _ime);
          void setPrezime(string _prezime);
          void setGodiste(int _godiste);
};

c_osoba::c_osoba(){
   //ne radi nista                  
}
string c_osoba::getIme(){
   return this->ime;      
}
string c_osoba::getPrezime(){
   return this->prezime;      
}
int c_osoba::getGodiste(){
   return this->godiste;  
}
void c_osoba::setIme(string _ime){
   this->ime = _ime;    
}
void c_osoba::setPrezime(string _prezime){
   this->prezime = _prezime;    
}
void c_osoba::setGodiste(int _godiste){
   this->godiste = _godiste;    
}

#endif

No comments:

Post a Comment