Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Data Structure Expert

Program Scenario: A group of USA Astronauts have been selected at random for a special operative training mission called Net-Way Logistic Maneuvers. A detailed report had been requested listing all of the members of the newly organized team.

File input/output:
Input file: Astronaut.data ASCII text file in ascending order by the Astronaut ID. For each astronaut, the input data in the following format with 2 lines per astronaut. Fields are separated by spaces.

Astronaut Astro First name Astro Middle Name Astro Last Name '\n'
ID
integer>=0

Height Weight '\n'

Input file: NetWay.data ASCII text file identifying the astronauts selected for the special mission. records are in random order in the following format:
Astronaut ID '\n'

Output file: an ASCII text file in report format with good title and column heading. All data for each astronaut must be printed.

Data from the Astronaut.data must be read into a 1-D array of structures(or classes) named ASTRONAUT and thereafter all processing must be performed on the array of structures.
The following hierarchical/nested structures must be used:
a) NAME which consist of the first, middle and last names of astronaut. the first, middle and last name members must be C++ strings.

b) BODYSTATS which consists of height and weight.
there is a max of 35 astronauts in the program

No calculations performed in the fill array function.

The records(data lines) in the input file, NetWay.data must be read one after another and processed until the end of file is reached. As an ID is read from the file it must be matched(using the ordered linear search) in the 1-D array of ASTRONAUT structures for inclusion in the output report. Error checking of the ID is required.

The Ordered linear search (search is optimized to stop if match cannot be made) algorithm is required to search the ASTRONAUT array to find a member of the team.

Sample run: ID      First Name      Middle Name      Last Name      Height

1234   Sarah            Maggie                Lowe            124            65

1235   Nate             Sam                    Miller            132            70

1254   Matt              Kyle                   Boone           130            72

1260   Marissa          Sandra                Hogan           145            78

1290   Matthew        Sampson             Higgins          150            90

Data Structure, Computer Science

  • Category:- Data Structure
  • Reference No.:- M9458310

Have any Question?


Related Questions in Data Structure

Data Communication Delivering Information anywhere

Topic: Data Communication Delivering Information anywhere. Write a 9-12 pages paper in which you: Present an overview of the origin and history of the concept. Describe the current use of and attitude toward the concept. ...

Problem regarding the management program

Problem: Looks like its just adding a save and load feature to the same file you sent me for python 3.5 Until now, you have had to leave your team management program running on your computer indefinitely since you did no ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As