AddressBooks  Version 0.2
This is flexible sized address book
 All Classes Functions Variables
Public Member Functions | Private Attributes | List of all members
Address Class Reference

#include <Address.h>

Public Member Functions

 Address ()
 
 Address (string firstName, string lastName, string address, Date birthday)
 
void setFirstName (string newFirstName)
 
void setLastName (string newLastName)
 
void setAddress (string newAddress)
 
void setBirthday (Date newBirthday)
 
string getFirstName () const
 
string getLastName () const
 
string getAddress () const
 
Date getBirthday () const
 

Private Attributes

string firstName
 
string lastName
 
string address
 
Date birthday
 

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, "" and the birthday is set to the default Date.

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

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
birthday- the person's birthday

Member Function Documentation

string Address::getAddress ( ) const

This will return the person's address

Returns
the address
Date Address::getBirthday ( ) const

This will return the person's birthday.

Returns
the birthday
string Address::getFirstName ( ) const

This will return the person's first name

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

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::setBirthday ( Date  newBirthday)

This will update the person's birthday, for some reason.

Parameters
newBirthday- the person's new birthday
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.

Member Data Documentation

string Address::address
private

This is the person's address. It should be thought of as simply their street address, but could also contain their city, state and zip.

Date Address::birthday
private

This is the person's birthday. It will be a Date object.

string Address::firstName
private

This is the person's first name. In this case, the first name might be more than one word.

string Address::lastName
private

This is the person's last name. In this case, the last name might be more than one word.


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