Question: In C++ Deliverables: Class header: address.h Class Implementation: address.cpp - Implement a class address. - An address has a o house number o street o

In C++

In C++ Deliverables: Class header: address.h Class Implementation: address.cpp - Implement aclass address. - An address has a o house number o street

Deliverables:

Class header: address.h

Class Implementation: address.cpp

- Implement a class address. - An address has a o house number o street o optional apartment number o city o state - postal code. - All member variables should be private and the member functions should be public. - Implement two constructors: o one with an apartment number o one without an appartment number. - Implement a print function that prints the address with the street on one line and the city, state, and postal code on the next line. - Implement a member function comesBefore that tests whether one address comes before another when the addresses are compared by postal code. Returns false if both zipcodes are equa - Use the provided main.cpp to start with. - The code creates THREE instances of the Address class (three objects) to test your class. - Each object will utilize a different constructor. You will need to add the class definition and implementation. - The comesBefore function assumes one address comes before another based on zip code alone. The test will also return false when the zipcodes are equal. main.cpp - The code creates FOUR instances of the address class (four objects) to test your class. - Each object will utilize a different constructor. You will need to add the class definition and implementation. - The comesBefore function assumes one address comes before another based on zip code alone. The test will also return false when the zipcodes are equal. - Make sure your class compiles with using this main untouched. Feel free to change or add to it, however, your class must be able to compile with the original version

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!