Question
Write a program that prints a sorted phone list from a database of names and phone numbers. The data is contained in two files named
Write a program that prints a sorted phone list from a database of names and phone numbers. The data is contained in two files named "phoneNames.txt" and "phoneNums.txt". The files may contain up to 2000 names and phone numbers. The files have one name or one phone number per line. To save paper, only print the first 50 lines of the output.
Note: The first phone number in the phone number file corresponds to the first name in the name file. The second phone number in the phone number file corresponds to the second name in the name file. etc. You will find the test files in the Asn Five.zip
Example Output:
A Ablon614-604-2400
A Bender925-480-3800
A Emmerson530-367-7000
A King582-436-7724
A Meyerson213-840-5000
A Perenchio310-558-6868
Aart DeGeus850-982-5000
Aileen Adams918-853-2838
Ake Persson757-332-5000
Akop Pogosyan717-669-8450
Al Carter909-599-8676
Alan Austin850-493-9300
Alan Bersin819-625-6580
Alan Dachs415-274-7500
Alan Fohrer949-652-5577
Alan Karp614-542-3355
Alan Lowe407-282-8600
Alan Rasmussen209-375-8800
Alexander Lidow310-322-3331
Alexis Lodde606-783-7970
...
End program.
Required Test Cases:
Print the first 50 lines of the specified data files.
NOTE: I have required file just need is programming
Thanks
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