Using the data file below design a hierarchical struct to organize the data. Then declare an array of structs for the reservations. The data file contains ten reservations. There are 8 columns of data: party name, size, date and time for the reservation, phone number, email address, credit card number and expiration date for the credit card. The data can be read from the file below so you will not need to type it in repeatedly. Once you have populated the array with data perform the following tasks: Write a function that will print out to the screen the information for one reservation. In the main program write code that prompts the user to enter a date in the form MM DD YYYY Call the function to print out all reservations on that date. You can make a loop that calls the print function repeatedly or you can put that code inside the print function. TEST CASES: April 30, 2023 and May 12, 2023. In this example you need to carefully consider what data types to use. For example, the credit card number is too large to fit into an int or unsigned int. A string type will be fine in this case. The file contains the following data: NAME SIZE DATE TIME PHONE EMAIL CREDIT CARD NO EXPIRE G. Hughes 4 5 12 2023 7:00 256-543-1981 ghp@uah.edu 100056789231 7 25 2027 M. Ellis 2 5 10 2023 8:00 256-567-3819 mae@uah.edu 100052611123 6 23 2026 B. Rose 5 5 8 2023 6:30 256-578-6743 bhr@uah.edu 100069012399 5 26 2027 K. Elder 2 4 30 2023 7:15 256-591-2334 akl@uah.edu 100043121721 8 24 2028 T. Simms 3 5 12 2023 8:30 256-554-4591 trs@uah.edu 100016705601 2 24 2024 P. Kilper 6 5 5 2023 8:15 256-555-6413 phk@uah.edu 100028901819 7 23 2023 D. Rose 4 5 15 2023 7:00 256-567-8899 dgr@uah.edu 100023451155 8 28 2026 C. Snead 2 4 25 2023 8:45 205-231-7845 css@uah.edu 100017326610 1 31 2028 B. Wilson 5 5 30 2023 8:00 205-123-0919 baw@uah.edu 100092325511 9 30 2027 J. Adams 4 5 28 2030 9:00 256-321-0030 jea@uah.edu 100011225577 3 31 2026
Using the data file below design a hierarchical struct to organize the data. Then declare an array of structs for the reservations. The data file contains ten reservations. There are 8 columns of data: party name, size, date and time for the reservation, phone number, email address, credit card number and expiration date for the credit card. The data can be read from the file below so you will not need to type it in repeatedly.
Once you have populated the array with data perform the following tasks:
Write a function that will print out to the screen the information for one reservation.
In the main program write code that prompts the user to enter a date in the form MM DD YYYY
Call the function to print out all reservations on that date. You can make a loop that calls the print function repeatedly or you can put that code inside the print function.
TEST CASES:  April 30, 2023 and May 12, 2023.
In this example you need to carefully consider what data types to use. For example, the credit card number is too large to fit into an int or unsigned int. A string type will be fine in this case.
The file contains the following data:
NAME        SIZE  DATE        TIME  PHONE          EMAIL        CREDIT CARD NO  EXPIRE
G. Hughes   4     5 12 2023   7:00  256-543-1981   ghp@uah.edu  100056789231    7 25 2027
M. Ellis    2     5 10 2023   8:00  256-567-3819   mae@uah.edu  100052611123    6 23 2026
B. Rose     5     5 8  2023   6:30  256-578-6743   bhr@uah.edu  100069012399    5 26 2027
K. Elder    2     4 30 2023   7:15  256-591-2334   akl@uah.edu  100043121721    8 24 2028
T. Simms    3     5 12 2023   8:30  256-554-4591   trs@uah.edu  100016705601    2 24 2024
P. Kilper   6     5 5  2023   8:15  256-555-6413   phk@uah.edu  100028901819    7 23 2023
D. Rose     4     5 15 2023   7:00  256-567-8899   dgr@uah.edu  100023451155    8 28 2026
C. Snead    2     4 25 2023   8:45  205-231-7845   css@uah.edu  100017326610    1 31 2028
B. Wilson   5     5 30 2023   8:00  205-123-0919   baw@uah.edu  100092325511    9 30 2027
J. Adams    4     5 28 2030   9:00  256-321-0030   jea@uah.edu  100011225577    3 31 2026
Trending now
This is a popular solution!
Step by step
Solved in 4 steps









