//***************************************************** //customerRec.h // // Author: Constance Royden // Date: April 13, 2014 // Class: CSCI 131, Professor Royden // Purpose: contains constants, typedefs and class definition // for the CustomerRec class //****************************************************** #include <iostream> #include <cstring> using namespace std; const int NAME_SIZE = 25; //max length for a customer's name const int ADDRESS_SIZE = 50; //max address length typedef char NameType [NAME_SIZE + 1]; //type for customer's name typedef char AddressType [ADDRESS_SIZE + 1]; //type for customer's address class CustomerRec { public: CustomerRec( ); //Default constructor CustomerRec(NameType newName, AddressType newAddress); //Constructor with parameters void SetName(NameType newName); //Set name data member to newName void SetAddress(AddressType newAddress); //Set address data member to newAddress void GetName(NameType &theName); //Return customer name (in parameter, theName) void GetAddress(AddressType &theAddress); //Return customer address (in parameter, theAddress) void Write( ) const; //Output name and address to standard out private: NameType name; //name of customer AddressType address; //mailing address of customer };