Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello I am working on the printResults method but not too sure what the logic for it is supposed to do. i think i am

hello I am working on the printResults method but not too sure what the logic for it is supposed to do. i think i am supposed to compare the strings like i have it. but what is the results supposed to do? thanks! image text in transcribed
image text in transcribed
image text in transcribed
16 17 5 double computeMedian(int *myArray, int num) { selectionSort (myArray, num); int middle = num/2; return myArray (middle-1); 29 30 void printResults(char *type, double results) { if(strcmp(type, "Median")) { 36 printResults from the array (by value he array the array of the array deviation of the array case 1: printArray(myArray, num); break; case 2: num = deleteSingleValue(myArray, num); break; case 3: mean - computeMean(myArray, num); printResults( type: "Mean", mean); break; case 4: median - computeMedian(myArrayl num); printResults( type: "median", median); break; case 5: midpoint - computeMidpoint (myArray, num); printResults("Midpoint", midpoint); break; main ule square foot of that number TE: Integer arithmetic happens so ensure you cast so double arithmetic happens ters my Array Representing the array of integers num Representing the number of actual elements in the array ns double Representing the mean of the integers in the array rintResults() ad printResults char* type, double result The printResults methods prints the results of the statistical calculation String type is once again ateral string that will be printed to the screen Parameters type Representing a literal String to what is being printed result Representing the result of the statistical calculation Type here to search

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

Students also viewed these Databases questions