Please send questions to
st10@humboldt.edu .
// implement a class Staff, representing a
// staff member at Stanford
// created by: Sharon M. Tuttle
// last modified: 10-13-03
#include <string>
#include "Staff.h"
using namespace std;
// constructors
Staff::Staff(string lName, string fName, string email,
double sal, bool isMgr)
{
lastName = lName;
firstName = fName;
emailAddress = email;
salary = sal;
isManagement = isMgr;
}
Staff::Staff(string lName, string fName)
{
lastName = lName;
firstName = fName;
// what these member variables should be
// if the user ONLY specifies a Staffer's
// name:
salary = MIN_WAGE;
emailAddress = "";
isManagement = false;
}
Staff::Staff()
{
lastName = "";
firstName = "";
emailAddress = "";
salary = 0.0;
isManagement = false;
}
// accessor functions
string Staff::get_lastName() const
{
return lastName;
}
string Staff::get_firstName() const
{
return firstName;
}
string Staff::get_emailAddress() const
{
return emailAddress;
}
double Staff::get_salary() const
{
return salary;
}
bool Staff::get_isManagement() const
{
return isManagement;
}
// mutator functions
void Staff::set_lastName(string newLName)
{
lastName = newLName;
}
void Staff::set_firstName(string newFName)
{
firstName = newFName;
}
void Staff::set_emailAddress(string newEml)
{
emailAddress = newEml;
}
void Staff::set_salary(double newSal)
{
salary = newSal;
}
void Staff::set_isManagement(bool newVal)
{
isManagement = newVal;
}