Question: Lab 5 . 4 - Mailing Label ( MailingLabel ) The file mailing _ list. text for this lab is formatted as in Lab 5
Lab Mailing Label MailingLabel
The file mailinglist. text for this lab is formatted as in Lab :
Lastname firstname housenumber streetname streettype city state zip
For example:
Arnow David Bedfore Avenue Brooklyn NY
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'tabelString 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, eg or B
Sample Test Run
For example, if the file mailinglist. text contains:
Arnow David Bedford Avenue Brooklyn NY
Weiss Gerald Anywhere Street Nowhere NW
the program should produce the following output:
David Arnow
Bedford Avenue
Brooklyn, NY
Gerald Weiss
Anywhere Street
Nowhere, NW
DO NOT USE ARRAYS USE THE REQUIRED FOR LOOP AND METHOD
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
