Back

// Matt Kaliszewksi
// COMP411 - Lab 06
// October 16, 2002
// User.cpp

#include "User.h"

////////////////////////////////////////////////////////////
// Default constructor
User::User(){}

////////////////////////////////////////////////////////////
// Constructor to create a new User
User::User(string u, string n, string ph, string pr)
{
       // Create a new user
       username = u;
       name = n;
       phone = ph;
       privilege = pr;
}

////////////////////////////////////////////////////////////
// Accessor method to retrieve the username of the user
string User::getUserName()
{
       return username;
}

////////////////////////////////////////////////////////////
// Accessor method to retrieve the name of the user
string User::getName()
{
       return name;
}

////////////////////////////////////////////////////////////
// Accessor method to retrieve the phone number of the user
string User::getPhone()
{
       return phone;
}

////////////////////////////////////////////////////////////
// Accessor method to retrieve the privilege of the user
string User::getPrivilege()
{
       return privilege;
}

////////////////////////////////////////////////////////////
// Mutator method to set the name of a user
void User::setName(string n)
{
       name = n;
}

////////////////////////////////////////////////////////////
// Mutator method to set the name of a user
void User::setPhone(string ph)
{
       phone = ph;
}

////////////////////////////////////////////////////////////
// Mutator method to set the name of a user
void User::setPrivilege(string pr)
{
       privilege = pr;
}

Back