Habsburg

Gleč

Apr 23rd, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. struct StudentA {
  4.     int ID;
  5.     string ime;
  6.     string prezime;
  7.     int* brojSobeID;
  8.     /*
  9.         I tako dalje
  10.     */
  11.    
  12. };
  13.  
  14. class Korisnik {
  15.     public ~Korisnik() {};
  16.     virtual void postaviID(string _ID) = 0;
  17.     virtual void postaviStatus(int _status) = 0;
  18. };
  19.  
  20. class StudentB : public Korisnik{
  21.     private:
  22.         string ID;
  23.         int status;
  24.         void postavi ID(string _ID) {
  25.             ID =_ID;
  26.         }
  27.         void postaviStatus(int _status) {
  28.             status = _status;
  29.         }
  30.        
  31. };
  32.  
  33. class Upravitelj : public Korisnik{
  34.     private:
  35.         string ID;
  36.         int status;
  37.         void postavi ID(string _ID) {
  38.             ID =_ID;
  39.         }
  40.         void postaviStatus(int _status) {
  41.             status = _status;
  42.         }
  43. };
Advertisement
Add Comment
Please, Sign In to add comment