Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // HEADER
- #ifndef STUDENT_H
- #define STUDENT_H
- #include <string>
- // #include <iostream>
- //using namespace std;
- using std::string;
- // D.1 - Create the base class `Student`
- class Student {
- protected: // Protected members are visible to derived classes
- string studentId;
- string firstName;
- string lastName;
- string emailAddress;
- string degreeProgram;
- int age;
- int daysToComplete[3]; // Refactor to vector?
- // Degree::DegreeType degreeProgram;
- // Degree degreeProgram;
- // Degree degreeType; //
- public: // Public members are visible everywhere in the application
- Student(); // Empty constructor
- // D.2C - Constructor using all input parameters
- Student(
- string studentId,
- string firstName,
- string lastName,
- string emailAddress,
- string degreeProgram,
- int age,
- int daysToComplete[]
- // int* daysToComplete
- );
- // D.2E - Destructor
- ~Student();
- // D.2A - Getters
- string getStudentId(); // Declare methods in class/header, define in source
- string getFirstName();
- string getLastName();
- string getEmailAddress();
- int getAge();
- int* getDaysToComplete();
- // D.2F - Virtual getDegreeProgram()
- virtual Degree get_degree_program() = 0; // Pure virtual function
- // string getDegreeProgram();
- // D.2B - Setters
- void setStudentId(string studentId);
- void setFirstName(string firstName);
- void setLastName(string lastName);
- void setEmailAddress(string emailAddress);
- void setAge(int age);
- void setDegreeProgram(string degreeProgram); // virtual?
- // void setDegree(Degree degreeIn);
- void setDaysToComplete(int days0, int days1, int days2); // array
- // D.2D - Print specific student data
- // virtual void print();
- virtual void print() = 0;
- };
- #endif /* STUDENT_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement