Question: This is the assignment given in a fundamentals of programming one class Here is the input file given to use lbbcswebdavipid 1248722 dt content rid
lbbcswebdavipid 1248722 dt content rid 6629011 1/course/cosc 1436 001 002 162s cyounglamayo D CodeLab Blackboard Learn se Home IMySPc COSC1415 Program using 1D arrays A special traveling exhibit was on display at the Texas Tech Museum for 14 days. You are asked to produce a report about overall attendance. a of the fo information, in the following Create report order: Print a report header with your name and the date and an appropriate title Print total attendance for the exhibit. Print the average attendance for all 14 days. Print maximum daily attendance and the day it occurred Print minimum daily attendance and the day it occurred. Print average attendance for the first 3 days. Print average attendance for the last days. Print the values 1-14 and the corresponding attendance for that day. Give all averages with one place after the decimal. Input the attendance for each day from the data file. This file contains 14 numbers which represent attendance for each of the 14 days. Use a one dimensional array to hold the attendance values. The day can be represented by the subscript. What will you do with subscript 0, what will the size of the your main so that it is very short and calls functions to do the detail work. You are required to write the following functions: 1. Write a function which reads the values from the input file and puts them into an array 2. that any number of given astar day and end day. You can call this function three times: the overall average, the average of first 3 days, and average of the last three days. This function should return a double value which is the average. 3. Write a function to compute and print the maximum and minimum daily attendance and the day occurred. 4. write a function which prints the day number, and the attendance for that day for all 14 may write more than those mentioned above, but you are required to write at least these four.) Each of these functions will need the array as a parameter. Remember that when you pass an array as parameter, it is always passed by reference. Send your output to a file. Label all your output clearly. The report should be meaningful on its own to someone who hasn't read the problem statement! Turn source code and your output file. R you pass a file stream as a parameter, t must always marked as a reference parameter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
