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

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!