Advertisement
Garusek

klasy

May 27th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.69 KB | None | 0 0
  1. #ifndef MISC_H_INCLUDED
  2. #define MISC_H_INCLUDED
  3.  
  4.  
  5. #include <iostream>
  6. #include <fstream>
  7. #include <stdlib.h>
  8. #include <fstream>
  9. using namespace std;
  10.  
  11. class wydzial
  12. {
  13.     int wydzial_id ;
  14.     string wydzial_name;
  15. public:
  16.     void stworz_id_wydzialu(int i)
  17.     {
  18.         dept_id = i ;
  19.     }
  20.     void stworz_nazwe_wydzialu(string n)
  21.     {
  22.         nazwa_wydzialu = n ;
  23.     }
  24.     void show_informacje_wydzialu()
  25.     {
  26.         cout << "ID wydziału : " << wydzial_id<<endl;
  27.         cout << "Nazwa wydziału : " << wydzial_name<< endl;
  28.     }
  29. };
  30.  
  31. class wykladowca:public wydzial
  32. {
  33.  
  34.     int id_wykladowcy ;
  35.     string nazwisko_wykladowcy ;
  36.     string kursy ;
  37. public:
  38.     void stworz_id_wykladowcy(int i)
  39.     {
  40.         id_wykladowcy = i ;
  41.     }
  42.     void stworz_nazwisko_wykladowcy(string n)
  43.     {
  44.         nazwisko_wykladowcy = n ;
  45.     }
  46.     void stworz_kursy(string c)
  47.     {
  48.         kursy= c;
  49.     }
  50.     void show_informacje_wykladowcy()
  51.     {
  52.         show_informacje_wydzialu();
  53.         cout << "ID wykladowcy : " << id_wykladowcy << endl;
  54.         cout << "Teacher Name : " << nazwisko_wykladowcy << endl;
  55.         cout << "Courses : " << courses <<endl;
  56.     }
  57. };
  58. class student:public wykladowca
  59. {
  60.  
  61.     int student_id ;
  62.     string nazwisko_studenta;
  63. public:
  64.     void stworz_id_studenta(int i)
  65.     {
  66.        id_studenta = i;
  67.     }
  68.     void stworz_nazwisko_studenta(string n)
  69.     {
  70.         nazwisko_studenta = n;
  71.     }
  72.  
  73.     void show_informacje_studenta()
  74.     {
  75.         show_dept_information();
  76.         show_teacher_information();
  77.         cout << "Student ID : " << student_id << endl;
  78.         cout << "Student Name : " << student_name << endl;
  79.     }
  80. };
  81.  
  82.  
  83.  
  84. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement