Question: write a program in C++ that creates an array of 10 PostalCode objects, reads 10 postal codes from the keyboard, and sets them to the
write a program in C++ that creates an array of 10 "PostalCode" objects, reads 10 postal codes from the keyboard, and sets them to the objects included in the array. Every postal code read from the keyboard is first validated and if valid it is set to the object in the array. Otherwise, the program displays an error message and asks the user to enter a valid postal code. After the array is filled with 10 valid postal codes, the program displays the postal codes on the screen. The program can display the postal codes with one space in between or with no space, according to the user's preference.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
