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

  Using command line options in bash shell script

Design a script that will permit the user to enter one of several choices from the command line. The specific requirements are as follows:

  What is minimum number of nodes expanded for bfs and dfs

Consider the following graph representing the state space and operators of a navigation problem: What is the minimum number of nodes expanded and the storage needed for BFS and DFS?

  Encryption feistel cipher and decryption algorithm

If this is psudocode for encryption feistel cipher determine decryption algorithm?Output: ciphertext = (left[16], right[16]) Explain pseudo-code of corresponding decryption algorithm for this cipher.

  An independent set in a graph g

An independent set in a graph G is a set of vertices I in G such that no two vertices in I are adjacent (neighbors). The maximum independent set problem is, given a graph G, to compute an independent set of maximum size (maximum number of vertices) i..

  Computing time complexity of procedure

What is the time complexity of the procedure? If A[l .. r] = [24, 30, 09, 46, 15, 19, 29, 86,78], what is the output?

  Give algorithm to find schedule to obtain maximum profit

Give an algorithm to find the schedule that obtains the maximum amount of profit, assuming that all processing times are integers between 1 and n.

  Sketch portion of decision tree via quicksort to sort array

Suppose you are using quicksort to sort array A with 6 distinct elements a1, a2, ..., a6. Sketch portion of the decision tree which corresponds to th ordering a3

  Write program to do operaretions of stack-push-pop-peek

Write down the program which does the basic stack operations: Make the stack. Push element into the stack. Pop element from the stack.

  Show result of inserting keys using quadratic probing

Show the result of inserting these keys by using linear probing, using quadratic probing with c1 = 1and c2 = 3, and using double hashing with h2(k) = 1 + (k mod (m-1)).

  Write a c++ program to find the intersection

Write a C++ program to find the intersection, A set is a collection of distinct entities regarded as a unit, being either individually specified or (more usually) satisfying specified conditions.

  Write algorithm to create job applicant report

Write the algorithm to create job applicant report. Input consists of a series of records that contain the Social Security number or equivalent, last name, first name, middle initial.

  How is a pert chart useful?

How is a Pert chart useful? How is a Gantt chart useful? What are the differences and similarities between both?

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