Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <map>
- using namespace std;
- class Student {
- protected:
- string m_name;
- int m_id;
- public:
- const string &getName() const {
- return m_name;
- }
- void setName(const string &name) {
- Student::m_name = name;
- }
- int getId() const {
- return m_id;
- }
- void setId(int id) {
- Student::m_id = id;
- }
- };
- class HeadMan : public Student
- {
- private:
- map <string, Student> m_listOfStudents; // список студентов с номерами телефонов
- map <bool, Student> m_listOfMissing; // список посещеаемости на одну пару
- public:
- const map<string, Student> &getListOfStudents() const {
- return m_listOfStudents;
- }
- void setListOfStudents(const map<string, Student> &listOfStudents) {
- HeadMan::m_listOfStudents = listOfStudents;
- }
- const map<bool, Student> &getListOfMissing() const {
- return m_listOfMissing;
- }
- void setListOfMissing(const map<bool, Student> &listOfMissing) {
- HeadMan::m_listOfMissing = listOfMissing;
- }
- };
- int main() {
- std::cout << "Hello, World!" << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement