In this project, you will sort envelopes as they arrive at the post office. Your program should sort the envelopes by Zip code and assign them to one of the four mail carrier. Zip codes are assigned to mail carrier using the following informaton:
Mail Carrier -------------------------------------Zip Code
The data for this program are saved in the file named Lettes.dat below. This file contains the name of the person, to whom the letter is addressed, and the addressee�s street address, city, state, and Zip code information.
You will create all necessary constructors for the Letter class by using default function arguments, if appropriate. In addition, you should implement the name, street, city, and state dynamically instead of an array of characters, and the zip as integer. Make sure that you write a destructor for this class, as you are now using dynamically allocated memory. You should also overload the comparison operators(>,<,==,!=,>=, and <=)so that you can sort the mail by carrier. In addtion, you will need to overload the assignment operator(=). Your specification file(i.e., letter.h)should have a copy constructor, the set methods and get methods for name, street, city, state, and zip.
Read the data from the file Letter.dat and print the information by mail carrier. Use the following prototype for the print fuction:
Void print(Letter*, int);
You should have the following files:letter.h,letter.cpp,and letter_drvr.cpp.