Need code in JAVA language 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...


Need code in JAVA language


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.



Test Run



Enter infomation for [0]


Enter the first name:


Anthony


Enter the last name:


Williams


Enter zip code:


08012



Enter infomation for [1]


Enter the first name:


Margo


Enter the last name:


Peters


Enter zip code:


08080



Enter infomation for [2]


Enter the first name:


Rosalie


Enter the last name:


Marshall


Enter zip code:


08013



Print the array


Anthony Williams 08012


Margo Peters 08080


Rosalie Marshall 08013



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here