Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A local university would like to hire you to write a C++ program that stores the home address and current college address for their students

A local university would like to hire you to write a C++ program that stores the home address and current college address for their students and displays this information in a report.

Address: Specify a structure namedAddressto store thestreet address, the city/state, and thezip code.You will use this structure as the data type for the required addresses in theStudentAddressstructure.

Specify a structure namedStudentAddressto store the following data for each student:

Name

Home Address.(Use the structure data type Address. Refer to Nested Structures.)

College Address.(Use the structure data type Address. Refer to Nested Structures.)

Specify a one-dimensional array to store the student address records. Set the maximum number of student records to 50 (the school can only accommodate 50 students each school year), butlet the user specifyhow many student records need to be entered.

Usemain( )as your driver function. The program doesnotneed to be repeatable.

Write appropriate functions thatmain( )calls to accomplish the following tasks:

Read the number of students in the school.

Read and store the name and required addresses for each student.

Display each students name and both addresses.

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 Address:

Street Address: 45 Ash

City, State: Morrilton, AR

Zip Code: 72110

College Address:

Street Address: 32 Elm

City, State: Conway, AR

Zip Code: 72034

Please enter the information for student 2.

Name: Lisa Mills

Home Address:

Street Address: 34 Spruce

City, State: Vilonia, AR

Zip Code: 72173

College Address:

Street Address: 56 Pine

City, State: Conway, AR

Zip Code: 72032

Please enter the information for student 3.

Name: Mike Hester

Home Address:

Street Address: 3 Oak

City, State: Greenbrier, AR

Zip Code: 72058

College Address:

Street Address: 5 Cedar

City, State: Conway, AR

Zip Code: 72034

Sample Output:

The Student Address report is:

Mary Jones

Home: 45 Ash

Morrilton, AR 72110

College: 32 Elm

Conway, AR 72034

Lisa Mills

Home: 34 Spruce

Vilonia, AR 72173

College: 56 Pine

Conway, AR 72032

Mike Hester

Home: 3 Oak

Greenbrier, AR 72058

College: 5 Cedar

Conway, AR 72034

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_2

Step: 3

blur-text-image_3

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

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions

Question

how to calculate appiled averhead how to calculate appiled averhead

Answered: 1 week ago