Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(C++)Nested Structures, Functions Required Save your program as Lab12-2-YourLast Name.cpp) A small private elementary school would like to hire you to write a C++ program
(C++)Nested Structures, Functions Required
Save your program as Lab12-2-YourLast Name.cpp) A small private elementary school would like to hire you to write a C++ program that stores students' emergency phone numbers for school purposes. The students' are required to provide the school with 3 phone numbers in case of an emergency a. Phone: Specify a structure named Phone to store the area code, prefix, and last four digits of the phone number (suffix). You will use this structure as the data ope for the required phone numbers in the StudentPhoneRecord structure. (See lecture notes concerning a structure within a structure" or P. 613 Nested Structures".) b. Specify a structure named StudentPhoneRecord to store the following data for each student: . Name 2. Home Phone Number. (Use the structure data type Phone. Refer to Nested Structures.) 3. Emergency Phone Number. (Use the structure data type Phone. Refer to Nested Structures.) 4. Student's Doctor Phone Number. Use the structure data type Phone. Refer to Nested Structures) C. Specify a one-dimensional array to store the student phone information records. Set the maximunm number of student records to 50 (the school can only accommodate 50 students each school year), but let the user specify how many student records need to be entered. d. Use main) as your driver function. The program does not need to be repeatable e. Write appropriate functions that main) calls to accomplish the following tasks: 1. Read the number of students in the school 2. Read and store the name and required phone numbers for each student. 3. Display each student's name and required phone numbers. Sample Input Number of students (must be a positive number less than or equal to 50) 3 Please enter the information for student 1 Name: Mary Jones Home Phone Area Code: 501 Prefix: 329 Suffix: 4823 Emergency Phone: Area Code: 870 Prefix: 345 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