Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

98% Assignment Details XL2_CIS/CSC-5-48639/48683 OL (08/23-12/16) Program Logic... OL Description i... CIS/CSC-5 Programming Concepts PM and Methodogy I Assignment: Programming Assignment 5 Objective Demonstrate the

image text in transcribed
98% Assignment Details XL2_CIS/CSC-5-48639/48683 OL (08/23-12/16) Program Logic... OL Description i... CIS/CSC-5 Programming Concepts PM and Methodogy I Assignment: Programming Assignment 5 Objective Demonstrate the use of functions to modularize code, read data into arrays and access arrays to collect statistical data. Instructions: PM This program will read date from a file containing Airline Safety Data collected between 2000 and 2014. 1. In this assignment you MUST add at least one function to perform some non-trivial task. It is your choice, but it cannot be trivial. 2. The first loop will read the data from the file and store it into five parallel arrays, one for each column of data, or you may use one array for the names and a matric for the data its. For example, there may be an array named "Airline" which holds all of the airline names, and another called "SeatKM" that holds all of the the seat_kms_per_week column, etc. 3. The second loop will scan the array, collect the following statistics, and output a report of the following: A. Which is the busiest airline (highest seat_km_per_week). B. The safest airline to fly based on dividing seat_kms by the fatal accidents. This will produce an index; the higher the index the safer the airline (i.e., more seat-kilometers flown between fatalities). If an airline has no (0) fatal_accidents, then set fatal accidents to 1 before performing the division. C. The Least safe airline to fly. D. The average number of fatalities for all airlines. Challenge: Instead of 5 parallel arrays use one array to hold the 'n' airline names and a parallel matrix to hold the statistical data (n rows, 4 columns) Array Matrix airline 1 stat1 stat2 stat3 stat4 airline 2 stat1 stat2 stat3 stat4 airline n stat1 stat2 stat3 stat4 Work Products: Submit: 1. Design artifacts, completed BEFORE you begin to code! (txt, docx, pdf). 2. Your program file (.cpp) Hints: 1. With parallel arrays, if a particular airline name is at position 'x' in the airline array, then it's corresponding data will be in the other four arrays, or matrix row, also at position 'x'. 2. It is easiest to add one feature at a time then debug that feature, then start on the next feature. Trying to code all of the features at one time, then debugging them all at once is workable for an accomplished programmer, but not necessarily for learners. 3. Don't forget to use a non-trivial function of your choice. (Non-trivial means it actually accomplishes something useful for the program. Sample Input: Airline Avail_Seat_KM_Per_Week Incidents Fatal_Accidents Fatalities " are meta-symbols and are not part of the output. The busiest airline is km seats. The safest airline is having a fatal accident index of . The least safe airline is having an fatal accident index of . The average number of fatalities for all airlines is . End of Programming Assignment 5 Submit Assignment Previous Next 2 dar To Do Notifications Inbox

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

Step: 3

blur-text-image

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

2. What potential market segments can you identify?

Answered: 1 week ago