Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE USE FUNCTIONS TEMPLATE PROVIDED AND WORK ONLY ON THE \"TODO\". DO NOT DEL

ID: 3598510 • Letter: P

Question

PLEASE USE FUNCTIONS TEMPLATE PROVIDED AND WORK ONLY ON THE "TODO". DO NOT DELETE ANY CODE. Harish T. please do not answer this question.

home / study / engineering / computer science / computer science questions and answers / please use functions template provided and work on "todo" /*functions.cpp*/ #include #include ...

Question: PLEASE USE FUNCTIONS TEMPLATE PROVIDED AND WORK ON "TODO" /*functions.cpp*/ #include #include #in...

(2 bookmarks)

/*functions.cpp*/

#include
#include
#include
#include
#include

using namespace std;

//
// InputData()
//
// Given an input file of the following format:
//
// uin exam1 exam2 exam3
// uin exam1 exam2 exam3
// .
// .
// .
// -1 -1 -1 -1
//
// Inputs the data and stores the exam1 scores into array exam1,
// exam2 scores into array exam2, and exam3 scores into array
// exam3. The uins are discarded. The function returns the #
// of students N that were input and stored into the arrays.
//
int InputData(string filename, int exam1[], int exam2[], int exam3[])
{
//
// TODO:
//

return -1;
}


//
// Sort()
//
// Sorts the given array of N integers into ascending order.
// Uses selection sort, which is fine for small values of N,
// N < 10,000.
//
// If you want to see different sorts "in action", here's a
// great web site for algorithm visualizations:
// http://www.sorting-algorithms.com/
//
void Sort(int A[], int N)
{
int indexOfMin;

//
// Selection sort: select the min element, move to front,
// repeat.
//
for (int i = 0; i < N - 1; i=i+1)
{
//
// find the min in range i..N, and then move min element
// to the front of range:
//
indexOfMin = i; // assume the first is the min:

for (int j = i + 1; j < N; j=j+1) // look for a smaller one:
{
if (A[j] < A[indexOfMin])
{
indexOfMin = j;
}
}

//
// we have index of min element, swap with first element so
// that we have sorted one element to the front:
//
if (indexOfMin != i) // swap:
{
int T = A[i];
A[i] = A[indexOfMin];
A[indexOfMin] = T;
}
}//for

//
// A is now sorted:
//
return;
}


//
// ComputeAvg()
//
// Returns the average of N integers in array A; it
// is assumed that N > 0.
//
double ComputeAvg(int A[], int N)
{
//
// TODO:
//

return -1;
}


//
// ComputeMedian()
//
// Given an array A of N integers in sorted order, returns
// the median value. If N is even, the median is the avg
// of the middle values.
//
double ComputeMedian(int A[], int N)
{  
//
// TODO:
//

return -1;
}


//
// StandardDev()
//
// Given an array A containing N real numbers, computes and returns
// the population standard deviation. The function should not change
// the contents of the array.
//
double StandardDev(int A[], int N)
{
//
// TODO:
//

return -1;
}


//
// Histogram()
//
// Given an array of N scores, computes the # of A's, B's,
// C's, D's, and F's. Definition of letter grades follows
// the standard 90-80-70-60:
//
// A: 90..100
// B: 80..89
// C: 70..79
// D: 60..69
// F: 0..59
//
// The histogram is returned via the 3rd parameter "hist".
// This parameter is assumed to be of size 5. The # of A's
// will be hist[0], B's [1], C's [2], D's [3], and F's [4].
//
void Histogram(int A[], int N, int hist[])
{
//
// TODO:
//

return;
}

Summary: write complete C++ program to analysis student exam scores In class we've discussed using arrays to store exam scores for a class, and writing functions to input the data, compute the median, etc And in lab this week you wrote a function to compute standard deviation. We're going to put all these pieces together to write a program that analyzes a set of 3 exams across a semester The input file will consist of 4 columns: last 4 digits of UIN, exam 1, exam 2, and exam 3. The end of the file will be marked by-1-1-1-1 Here's an example (this is the first test case 1234 80 81 82 2231 90 89 88 2561 100 12 12 3009 100 70 79 3754 60 59 70 4101 50 89 100 4202 10 20 30 5981 18 20 20 6299 30 30 28 7890 88 87 88 8171 100 80 90 9906 59 69 79 The program is going to compute and output the number of students, the average of each exam, the median of each exam, the population standard deviation of each exam, and a histogram (A's, B's, C's, D's, Fs) of each exam. Here's the output for the above input sequence

Explanation / Answer

package com;
public class ArraySortedPolynomial implements PolynomialInterface

{

ArraySortedPolynomial()

{

}

ArraySortedPolynomial(String pol)

{

}

@Override

public PolynomialInterface add(PolynomialInterface other) {

// TODO Auto-generated method stub

return null;

}

@Override

public PolynomialInterface subtract(PolynomialInterface other) {

// TODO Auto-generated method stub

return null;

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote