SHARE
TWEET

Untitled

pipingpiccolo Sep 19th, 2019 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // HEADER
  2.  
  3. #ifndef STUDENT_H
  4. #define STUDENT_H
  5. #include <string>
  6. // #include <iostream>
  7. //using namespace std;
  8. using std::string;
  9.  
  10. // D.1 - Create the base class `Student`
  11. class Student {
  12.   protected: // Protected members are visible to derived classes
  13.     string studentId;
  14.     string firstName;
  15.     string lastName;
  16.     string emailAddress;
  17.     string degreeProgram;
  18.     int age;
  19.     int daysToComplete[3]; // Refactor to vector?
  20.     // Degree::DegreeType degreeProgram;
  21.     // Degree degreeProgram;
  22.     // Degree degreeType; //
  23.  
  24.   public: // Public members are visible everywhere in the application
  25.     Student(); // Empty constructor
  26.  
  27.     // D.2C - Constructor using all input parameters
  28.     Student(
  29.       string studentId,
  30.       string firstName,
  31.       string lastName,
  32.       string emailAddress,
  33.       string degreeProgram,
  34.       int age,
  35.       int daysToComplete[]
  36.       // int* daysToComplete
  37.     );
  38.    
  39.     // D.2E - Destructor
  40.     ~Student();
  41.  
  42.     // D.2A - Getters
  43.     string getStudentId(); // Declare methods in class/header, define in source
  44.     string getFirstName();
  45.     string getLastName();
  46.     string getEmailAddress();
  47.     int getAge();
  48.     int* getDaysToComplete();
  49.    
  50.     // D.2F - Virtual getDegreeProgram()
  51.     virtual Degree get_degree_program() = 0; // Pure virtual function
  52.     // string getDegreeProgram();
  53.  
  54.     // D.2B - Setters
  55.     void setStudentId(string studentId);
  56.     void setFirstName(string firstName);
  57.     void setLastName(string lastName);
  58.     void setEmailAddress(string emailAddress);
  59.     void setAge(int age);
  60.     void setDegreeProgram(string degreeProgram); // virtual?
  61.     // void setDegree(Degree degreeIn);
  62.     void setDaysToComplete(int days0, int days1, int days2); // array
  63.  
  64.     // D.2D - Print specific student data
  65.     // virtual void print();
  66.     virtual void print() = 0;
  67. };
  68.  
  69. #endif /* STUDENT_H */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top