Question: Implement a class Address. An address has a house number, a street, an optional apartment number, a city, a state, and a postal code. Supply
house_number is an integer;
street is a string;
apartment_number is an integer;
city is a string;
state is a string;
postal_code is a string;
Please create the following files i need 3 FILES Address.h Address.cpp main.cpp UseAddressas your class name Use main.cpp as your test program and write the following tests.
- create an address without the apartment number.
- create another address with the apartment number.
- Use the print function to print out the addresses that you just create in your main.cpp. Use the information in below to create your addresses:
Comparing address
148 First Ave
San Diego, CA, 10392
with address
553 Second St, #44
San Diego, CA, 10394
The first address comes before the second
- Use a less than operator to compare two address. If the first address' zip code is less than the second address' zip code, then print The first address comes before the second otherwise, print The first address comes after the second
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
