Facebook
From dfdfsfds, 2 Weeks ago, written in Plain Text.
This paste is a reply to Jeehhe from Hwhh - view diff
Embed
Download Paste or View Raw
Hits: 114
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. class Person
  7. {
  8.     private:
  9.         string imie;
  10.         string nazwisko;
  11.         string pesel;
  12.     public:
  13.         Person(string imie="", string nazwisko="", string pesel){}
  14.     string get_imie() const {
  15.         return imie;
  16.     }
  17.     string get_nazwisko() const{
  18.         return nazwisko;
  19.     }
  20.     string get_pesel {
  21.         return pesel;
  22.     }
  23.     string to_string() const{
  24.         return "Osoba: " + imie + "" + nazwisko + "Pesel: " + pesel;
  25.     }
  26. };
  27.  
  28. class Student : public Person
  29. {  
  30.     public:
  31.         Student(string nr_indeksu, string kierunek_studiow) : Person(imie), Person(nazwisko), Person(pesel);
  32. };
  33.  
  34. int main()
  35. {
  36.    
  37. }
  38.