Solution Found!
Write a program that manipulates three database files. The first file contains thenames
Chapter 8, Problem P8.24(choose chapter or problem)
Write a program that manipulates three database files. The first file contains thenames and telephone numbers of a group of people. The second file contains thenames and Social Security numbers of a group of people. The third file contains theSocial Security numbers and annual income of a group of people. The groups ofpeople should overlap but need not be completely identical. Your program shouldask the user for a telephone number and then print the name, Social Security number,and annual income, if it can determine that information.
Questions & Answers
QUESTION:
Write a program that manipulates three database files. The first file contains thenames and telephone numbers of a group of people. The second file contains thenames and Social Security numbers of a group of people. The third file contains theSocial Security numbers and annual income of a group of people. The groups ofpeople should overlap but need not be completely identical. Your program shouldask the user for a telephone number and then print the name, Social Security number,and annual income, if it can determine that information.
ANSWER:Step 1 of 3
The program should ask the user for the telephone number. Then, create a file stream pointer to the first file and search for the entered telephone number. Display the corresponding name to the telephone number. Then using this name, search for the corresponding Social Security Number in the second file. At last, using Social Security Number, search for the income.