Astronaut.data must be read into a 1-d array

Assignment Help Data Structure & Algorithms
Reference no: EM13168194

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

Reference no: EM13168194

Questions Cloud

Describe and explain denial of service : Describe and explain Denial of Service (DoS) and Distributed Denial of Service (DDoS) network attacks
Ask the user to input a grade (integer from 1-100) : Program should still ask the user to input a grade (integer from 1-100) and then output the letter grade.  Scale:  Greater than 90 is an "A"; Greater than 80 to 90 is a "B", Greater than 70 to 80 is a "C", Greater than 60 to 70 is a "D", and 60 or le..
A class is a blueprint for an object : A class is a blueprint for an object. A class may have a default constructor, a constructor with arguments, accessor methods, mutator methods, public fields, and private fields.
Write a java application that reads a file containing text : Write a Java application that reads a file containing text. Your program should read each line and display it on the console screen preceded by line numbers.
Astronaut.data must be read into a 1-d array : 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 diet model : For the diet model, suppose that the daily availability of corn is limited to 450 lb. Identify the new solution space, and determine the new optimum solution.
Check wether two appointments overlap : in a scheduling program, we want to check wether two appointments overlap. For simplicity, appointments start at a full hour,
Program to find the factors : Write a c++ program to find the factors of an integer (entered by the user) which are themselves squares.
Assume that you have a 64-bit architecture : Assume that you have a 64-bit architecture, but you need to work with numbers that are up to 2^4096. Your available programming language can support 64-bit numbers. How would you design software to do this (Use a maximum of one to two paragraphs o..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Inventory tracking database

Construct a relational database of your choice. The DB should contain no more than six tables. Define three business requirements that this database will provide.

  Object oriented approach versus the relational database

Supporters of object oriented databases list many benefits for using the object oriented approach versus the relational one.

  Explaining effective customer relationships and loyalty

Paws'n Tails is an online pet shop that wants to influence what customers buy and builkd effective customer relationships and loyalty.

  How the regular tree walk algorithm works

We know how the regular tree walk algorithm works. If you have some values in the tree then the tree walk algorithm prints everything in order

  Creating decision tree

Premium Airlines has currently offered to settle claims for a class action suit, which was originated for alleged price fixing of tickets. The settlement is stated as follows. Create a decision tree for this condition.

  Question about binomial tree

A binomial tree of height O, Bo is a one node tree. A binomial tree of height k, Bk is formed through attaching a binomial tree, Bk-1 to root of another binomial tree another binomial tree Bk-1.

  C++ program to evaluate expressions combining set union

Create a C++ program to evaluate expressions combining set union, set intersection and parentheses

  Relationships in a database model

Discuss different types of classifications and do they overlap, or do they each tell us something unique about the entity relationship?

  Dbms and data mining to imporve customer service

Discuss how a database management system and data mining can help motor vehicle maintenance center improve its services, and what tables would be required in such a database.

  Short discussion on the concept of cryptography

The answer gives the learner with a short discussion on the concept of cryptography and the different aspects and functions that are provided through using encryption.

  Er diagram of cardinality and modality

Read the following information about World Relief for Disaster Victims (WRDV), a fictional nonprofit organization that provides aid to victims of natural disasters.

  Time n-processor common crcw pram algorithm

present an O(1) time n-processor common CRCW PRAM algorithm for computing the boolean AND of n bits.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd