PersonT.cpp

URL: http://147.64.242.52/~bennett/class/cmsc2040/fall2026/notes/inherit/code/preClass/PersonT.cpp
 
#include <iostream>
#include "PersonT.h"

using namespace std;

PersonT::PersonT() {
   cout << "In the person constructor " << endl;
}

void PersonT::Name(string newName) {
    name = newName;
}

string PersonT::Name() const {
    return name;
}

string PersonT::Role() const {
    return "Unknown";
}

StudentT::StudentT(){
    cout << "In the StudentT constructor" << endl;
}

float StudentT::GPA() const{
    return gpa;
}

void StudentT::GPA(float newGPA){
    gpa = newGPA;
}

std::string StudentT::Role() const{
    return "Student";
}

string GradStudentT::Role() const{
    return role;
}

void GradStudentT::Role(string newRole){
     role = newRole;
}

ProfessorT::ProfessorT(){
    cout << "In the ProfessorT constructor" << endl;
}

std::string ProfessorT::Role() const {
    return "Professor";
}

int ProfessorT::Classes() const {
    return classes;
}

void ProfessorT::Classes(int newCount){
     classes = newCount;
}

bool AdministratorT::Decide(string) {
   return false;
}