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
|
#include <iostream>
#include <string>
#include "Person.cpp"
using namespace std;
class Student : public Person
{
private:
string major;
int collegeYear; // 1 freshman 2 sophomore 3 junior 4 senior
public:
Student(int ID, string firstName, string lastName, string major,int collegeYear);
};
Student::Student(int ID, string firstName, string lastName, string major,int collegeYear):Person(ID, firstName, lastName), major(major), collegeYear(collegeYear)
{
Person(ID, firstName, lastName);
this -> major = major;
this -> collegeYear = collegeYear;
}
|