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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started