//
//  NAME
//    person.cpp
//
//  DESCRIPTION
//    This file contains functions used to implement the Person module.
//
//    For descriptions of the parameters and return values of 
//    exported (non-static) functions, see person.h.
//


//
//  Include files.
//

#include <iostream.h>
#include "bool.h"
#include "person.h"


//
//  NAME
//    printPerson
//
//  DESCRIPTION
//    This function prints each field of the given person structure.
//    A newline is printed at the end of each field and at the end
//    of the person.
//

void printPerson(person& p) {
   cout << "First name: " << p.firstName << endl;
   cout << "Last name:  " << p.lastName  << endl;
   cout << "Age:        " << p.age       << endl;
   cout << endl;
   return;
}


//
//  NAME
//    readPerson
//
//  DESCRIPTION
//    For each field in the person structure, this function displays 
//    a prompt, then reads in the value for that field.  No error
//    checking is done.
//

void readPerson(person& p) {
   cout << "Enter first name of person (up to " 
	<< firstNameLen << " characters): ";
   cin  >> p.firstName;
   cout << "Enter last name of person (up to "
         << lastNameLen << " characters): ";
   cin  >> p.lastName;
   cout << "Enter age of person (integer): ";
   cin  >> p.age;
   return;
}


//
//  End of file.
//