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: (see image)

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: (see image)

File
dinner_reservations
Edit
NAME
G. Hughes
M. Ellis
B. Rose
K. Elder
T. Simms
P. Kilper
D. Rose
C. Snead
B. Wilson
J. Adams
Ln 8, Col 90
View
SIZE
4
2
5
WN
2
3
64254
4
2
4
X
+
DATE
TIME PHONE
5 12 2023
5 10 2023
7:00 256-543-1981
8:00 256-567-3819
58 2023 6:30 256-578-6743
4 30 2023 7:15 256-591-2334
5 12 2023 8:30 256-554-4591
55 2023 8:15 256-555-6413
5 15 2023 7:00 256-567-8899
4 25 2023 8:45 205-231-7845
5 30 2023 8:00 205-123-0919
5 28 2030 9:00 256-321-0030
EMAIL
CREDIT CARD NO EXPIRE
ghp@uah.edu 100056789231 7 25 2027
mae@uah.edu 100052611123 6 23 2026
bhr@uah.edu 100069012399
akl@uah.edu 100043121721
trs@uah.edu 100016705601
phk@uah.edu 100028901819
dgr@uah.edu 100023451155
css@uah.edu 100017326610
baw@uah.edu 100092325511
jea@uah.edu 100011225577
5 26 2027
8 24 2028
2 24 2024
7 23 2023
8 28 2026
1 31 2028
9 30 2027
3 31 2026
100%
T
Windows (CRLF)
UTF-8
x
Transcribed Image Text:File dinner_reservations Edit NAME G. Hughes M. Ellis B. Rose K. Elder T. Simms P. Kilper D. Rose C. Snead B. Wilson J. Adams Ln 8, Col 90 View SIZE 4 2 5 WN 2 3 64254 4 2 4 X + DATE TIME PHONE 5 12 2023 5 10 2023 7:00 256-543-1981 8:00 256-567-3819 58 2023 6:30 256-578-6743 4 30 2023 7:15 256-591-2334 5 12 2023 8:30 256-554-4591 55 2023 8:15 256-555-6413 5 15 2023 7:00 256-567-8899 4 25 2023 8:45 205-231-7845 5 30 2023 8:00 205-123-0919 5 28 2030 9:00 256-321-0030 EMAIL CREDIT CARD NO EXPIRE ghp@uah.edu 100056789231 7 25 2027 mae@uah.edu 100052611123 6 23 2026 bhr@uah.edu 100069012399 akl@uah.edu 100043121721 trs@uah.edu 100016705601 phk@uah.edu 100028901819 dgr@uah.edu 100023451155 css@uah.edu 100017326610 baw@uah.edu 100092325511 jea@uah.edu 100011225577 5 26 2027 8 24 2028 2 24 2024 7 23 2023 8 28 2026 1 31 2028 9 30 2027 3 31 2026 100% T Windows (CRLF) UTF-8 x
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Table
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