Lab 12  Version L12
Basic Address Class
Public Member Functions | List of all members
Address Class Reference

#include <Address.h>

Public Member Functions

 Address ()
 
 Address (string firstName, string lastName, string address)
 
void setFirstName (string newFirstName)
 
void setLastName (string newLastName)
 
void setAddress (string newAddress)
 
string getFirstName ()
 
string getLastName ()
 
string getAddress ()
 

Detailed Description

This is a basic address class. It will have a first name, a last name and an address fields. They will all be strings. It will have two constructors and a full set of setters and getters.

Constructor & Destructor Documentation

Address::Address ( )

This is the default constructor. It simply sets all of the private variables to the empty string, ""

Address::Address ( string  firstName,
string  lastName,
string  address 
)

This is a parameterized constructor. It will set the fields to the values in the parameters.

Parameters
firstName- the person's first name
lastName- the person's last name
address- the person's address

Member Function Documentation

string Address::getAddress ( )

This will return the person's address

Returns
the address
string Address::getFirstName ( )

This will return the person's first name

Returns
the person's first name.
string Address::getLastName ( )

This will return the person's last name

Returns
the person's last name
void Address::setAddress ( string  newAddress)

This will update the address to the newAddress

Parameters
newAddress- the person's new address
void Address::setFirstName ( string  newFirstName)

This will update the person's first name to the given newFirstName

Parameters
newFirstName- the new first name of the person.
void Address::setLastName ( string  newLastName)

This will update the person's last name to the given newLastName

Parameters
newLastNAme- the person's new last name.

The documentation for this class was generated from the following files: