Patey

Untitled

Oct 12th, 2021
511
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. #include<string.h>
  3. using namespace std;
  4.  
  5. class persoana
  6. {
  7.     string nume;
  8.     int varsta;
  9. public:
  10.     persoana(string nume, int varsta)
  11.     {
  12.         this->nume = nume;
  13.         this->varsta = varsta;
  14.     }
  15. };
  16.  
  17. class student :public persoana
  18. {
  19.     int nota;
  20. public:
  21.     student(string nume, int varsta, int nota) :persoana(nume, varsta)
  22.     {
  23.         this->nota = nota;
  24.     }
  25. };
  26.  
  27. class angajat :public persoana
  28. {
  29.     int salariu;
  30. public:
  31.     angajat(string nume, int varsta, int bani) : persoana(nume, varsta)
  32.     {
  33.         this->salariu = salariu;
  34.     }
  35. };
  36.  
  37. class student_licenta :public student
  38. {
  39.     int an;
  40. public:
  41.     student_licenta(string nume, int varsta, int nota, int an) :student(nume, varsta, nota)
  42.     {
  43.         this->an = an;
  44.     }
  45. };
  46.  
  47. class student_master :public student
  48. {
  49.     int inaltime;
  50. public:
  51.     student_master(string nume, int varsta, int nota, int inaltime) :student(nume, varsta, nota)
  52.     {
  53.         this->inaltime = inaltime;
  54.     }
  55. };
  56.  
  57. class doctorand :public student
  58. {
  59.     string specializare;
  60. public:
  61.     doctorand(string nume, int varsta, int nota, string specializare) :student(nume, varsta, nota)
  62.     {
  63.         this->specializare = specializare;
  64.     }
  65. };
  66.  
  67. class profesor :public angajat
  68. {
  69.     int vechime;
  70. public:
  71.     profesor(string nume, int varsta, int salariu, int vechime) :angajat(nume, varsta, salariu)
  72.     {
  73.         this->vechime= vechime;
  74.     }
  75. };
  76.  
  77. class inginer :public angajat
  78. {
  79.     int vechime;
  80. public:
  81.     inginer(string nume, int varsta, int salariu, int vechime) :angajat(nume, varsta, salariu)
  82.     {
  83.         this->vechime = vechime;
  84.     }
  85. };
  86.  
  87.  
RAW Paste Data