-
Notifications
You must be signed in to change notification settings - Fork 0
/
Instructor.hpp
41 lines (31 loc) · 1.2 KB
/
Instructor.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
Name: Stanley Lim
Introduces us to polymorphism and how to insert pointers to Person into a linked list.
*/
#ifndef INSTRUCTOR_HPP //#################################################################################
#define INSTRUCTOR_HPP //## instructors aren't students or TA, only people, so its base class is Person ##
#include "Person.hpp" //#################################################################################
#include <string>
class Instructor: public Person
{
public:
//default constructor for instructor
Instructor();
//sets values for instructor
Instructor(int id, std::string first, std::string last);
//just returns office of the instructor
std::string getOffice() const;
//just returns contact info of the instructor
std::string getContact() const;
//user inputs office of the instructor
void setOffice(const std::string office);
//user inputs contact info for instructor
void setContact(const std::string contact);
//overrides the virtual display() function in Person
void display() override;
//these are private instead of protected because nothing is derived from Instructor
private:
std::string office_;
std::string contact_;
};
#endif