Question: Lab 5 . 4 - Mailing Label ( MailingLabel ) The file mailing _ list. text for this lab is formatted as in Lab 5

Lab 5.4- Mailing Label (MailingLabel)
The file mailing_list. text for this lab is formatted as in Lab 5.3:
. Last-name first-name house-number street-name street-type city state zip
For example:
Arnow David 2900 Bedfore Avenue Brooklyn NY 11210
This time, however, there is a header value preceding thetines of data.
Write a program that reads the data from the file as individual strings using next (remember, next stops reading when it encounters whitespace - a blank, tab, or newline), and prints the data out as a mailing label (as shown below).
The label should be printed using the method (which you are to write):
void prin'tabel(String first, String last, String houseNumber, String streetNme, String streetType, String city, String state, String zip)
(Note:: Although it is usually referred to as a 'house number', that field is actually a string as it could contain characters other than digits, e.g.,103-27 or 1115B).
Sample Test Run
For example, if the file mailing_list. text contains:
2
Arnow David 2900 Bedford Avenue Brooklyn NY 11210
Weiss Gerald 123 Anywhere Street Nowhere NW 19826
the program should produce the following output:
David Arnow
2900 Bedford Avenue
Brooklyn, NY 11210
Gerald Weiss
123 Anywhere Street
Nowhere, NW 19826
DO NOT USE ARRAYS USE THE REQUIRED FOR LOOP AND METHOD
Lab 5 . 4 - Mailing Label ( MailingLabel ) The

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 Programming Questions!