Question
Design and implement an application that reads a sequence of up to 25 pairs of names and postal (zip) codes for individuals. Store the data
Design and implement an application that reads a sequence of up to 25 pairs of names and postal (zip) codes for individuals. Store the data in an object of a class called NameAndZip, designed to store a first name (String), last name (String), and a postal code (int). Create a driver class called NameAndZipList. Assume that each line of input will contain two strings followed by an integer value. You will then create an object for each line read in and store that object in an array of NameAndZip objects. After the Names and Codes have been entered, print the list in an appropriate format to the screen using the toString method in the NameAndZip class. To test the program enter 3 names and codes.
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