Question: Using C++: (3) based on Problem P5.2. . Implement a class Address described in Problem. P5.11 The type used for apartment number and the house

Using C++:

Using C++: (3) based on Problem P5.2. . Implement a class Addressdescribed in Problem. P5.11 The type used for apartment number and thehouse number must be unsigned int. Add a (private) data field string

(3) based on Problem P5.2. . Implement a class Address described in Problem. P5.11 The type used for apartment number and the house number must be unsigned int. Add a (private) data field string barcode to the Address class and initialize it with the bar code obtained by converting the zip code into a string with the help of the encoding table in Exercise 4.16 (re-use the code from Homework 3) You can assume that the the user's input is always valid Write a loop in which the user is prompted to enter the address information and use it to construct an object of class Address. Then use the member function print to print out the Address information An optional apartment number. If Address does not have an apartment, the user wil indicate this by skipping the input, that is, by pressing 'Enter. Hint: To handle such input one can read a character and check if it is a newline character or not. If it is not, then use cin.unget to return the character back to the reading buffer and then read in the integer number using cin Submit the following 3 files. The main) function must be in the file hmw-4-4.cpp. The interface of the object Address must be in the file address.h and the description of the member functions of the Address class must be in address.cpp. Before submission make

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!