Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
image text in transcribed
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Describe the functions of Human resource management

Answered: 1 week ago

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago