-
Notifications
You must be signed in to change notification settings - Fork 0
/
Student.cpp
36 lines (30 loc) · 964 Bytes
/
Student.cpp
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
#include "Headers/Student.hpp"
Student::Student(const std::string personType,
const std::string name,
std::string surname,
std::string adress,
const unsigned long int pesel,
const std::string sex,
const unsigned long int index)
: Person(personType, name, surname, adress, pesel, sex)
, index_(index)
{}
bool Student::operator==(const Student& student) const
{
return(name_ == student.getName() and
surname_ == student.getSurname() and
adress_ == student.getAdress() and
pesel_ == student.getPesel() and
sex_ == student.getSex() and
index_ == student.getIndex());
}
void Student::printPerson()
{
Person::printPerson();
std::cout << index_ << " ";
}
//________________________GETTERS__________________________
unsigned long int Student::getIndex() const
{
return this->index_;
}