Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++:

image text in transcribedimage text in transcribedimage text in transcribed

(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago