Please send questions to
st10@humboldt.edu .
/*--------------------------------------------------------
Header file for class Prof
created by: Sharon Tuttle
last modified: 11-01-03 (adding member functions
alphaName, mailingName)
12-12-03 (adding no-argument constructor
and overloaded ==
and changed floats to doubles)
---------------------------------------------------------*/
#include <string>
using namespace std;
class Prof
{
public:
// constructor(s)
Prof (string lname, string fname, string mname,
string ttl, string email, string offcHrs,
double sal);
Prof ();
// accessor functions
string get_lastName() const;
string get_firstName() const;
string get_middleName() const;
string get_title() const;
string get_emailAddress() const;
string get_officeHrs() const;
double get_salary() const;
// mutator functions
void set_lastName(string new_lname);
void set_firstName(string new_fname);
void set_middleName(string new_mname);
void set_title(string new_ttl);
void set_emailAddress(string new_email);
void set_officeHrs(string new_offHrs);
void set_salary(double new_sal);
// overloaded operators
bool operator == (const Prof& rhProf) const;
// other public member functions
/*--------------------------------------------------
Contract: alphaName : void -> string
Purpose: Return a single string of the form:
lastName, firstName middleName
... of the object for which this function
is called.
Examples: cs131_prof.alphaName() ==
"Tuttle, Sharon Marie"
--------------------------------------------------*/
string alphaName() const;
/*--------------------------------------------------
Contract: mailingName : void -> string
Purpose: Return a single string of the form:
title firstName middleName lastName
... of the object for which this
function is called.
Examples: cs131_prof.mailingForm() ==
"Dr. Sharon Marie Tuttle"
--------------------------------------------------*/
string mailingName() const;
private:
// member variables
string lastName;
string firstName;
string middleName;
string title;
string emailAddress;
string officeHrs;
double salary;
};