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

  Auditing focuses on failures

Under normal situations, auditing focuses on failures to access rather than successful accesses. Explain why it might be a good concept to audit successful access to documents in a directory that contains highly confidential documents.

  Question about edge connectivity

The edge connectivity of an indirected graph is minimum number k of edges that must be removed to disconnect the graph.

  Model of online music sharing

Since Napster is going out of business, you have decided to begin your own on line music sharing site. You will give individual music documents at your site.

  Write a xml schema for the validation of the document notes.

write a XML schema for the validation of the document notes.xml. Write the schema according to the following three approaches;1.- Based on the document structure2.- Structured (bottom-up design)3.- Type-based (top-down design)

  Writing algorithm which ?nds xbest

Provide an O(n) algorithm which ?nds xbest such that distbest:= ∑i=1 to n|xbest - xi| is as small as possible.

  Explaining use of encryption-virus and vpn

Write down the suitable example of best use of Encryption, Virus, VPN, Firewall securities, when and explain why?

  True or false about networking

2- A print queue must be set up for every printer on the network served by a print server. True False

  Decision tree to help someone

Create a decision tree to help someone determine what meal to buy at a fast food restaurant. The structure of your tree should be similar to the one on page 699.

  Cost control techniques

Assume your company has just completed the Initiation Process for implementing an Email System Upgrade. It was identified in a recent meeting with management leaders from the Sales,

  Developing gui application with jframe

Make a GUI application with JFrame that haves 5-labels explaining reasons that a customer might not buy a specific product.

  Analyzing the use of databases

Create a paper analyzing the use of databases in your company. Include what database applications are used. Conclude through proposing improvements.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

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