Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE USE THIS TEMPLATE and PLEASE don't delete anything such as int main( int argc, char *argv[]) in c++ //include any standard libraries needed //

PLEASE USE THIS TEMPLATE and PLEASE don't delete anything such as int main(int argc, char *argv[])

in c++

//include any standard libraries needed

// - Passes in an array along with the size of the array.

// - Returns the mean of all values stored in the array.

double mean(const double array[], int arraySize);

// - Passes in an array, the size of the array by reference, and the index of a value to be removed from the array.

// - Removes the value at this index by shifting all of the values after this value up, keeping the same relative order of all values not removed.

// - Reduces arraySize by 1.

void remove(double array[], int &arraySize, int index);

// - Passes in an array and the size of the array.

// - Outputs each value in the array separated by a comma and space, with no comma, space or newline at the end.

void display(const double array[], int arraySize);

const int ARR_CAP = 100;

int main(int argc, char *argv[]) {

// verify file name provided on command line

// open file and verify it opened

// Declare an array of doubles of size ARR_CAP.

// Fill the array with up to ARR_CAP doubles from the file entered at the command line.

// Call the mean function passing it this array and output the

// value returned.

// Ask the user for the index (0 to size - 1) of the value they want to remove.

// Call the display function to output the array.

// Call the remove function to remove the value at the index

// provided by the user.

// Call the display function again to output the array

// with the value removed.

// Call the mean function again to get the new mean

return 0;

}

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

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 International Workshops Gdm Benchmarx Mcis Snsmw Diew Udm Tsukuba Japan April 2010 Revised Selected Papers Lncs 6193

Authors: Masatoshi Yoshikawa ,Xiaofeng Meng ,Takayuki Yumoto ,Qiang Ma ,Lifeng Sun ,Chiemi Watanabe

2010th Edition

3642145884, 978-3642145889

More Books

Students also viewed these Databases questions

Question

Question 45 Question 15

Answered: 1 week ago

Question

What does the start( ) method defined by Thread do?

Answered: 1 week ago