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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education