Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My program is supposed to do this: Working in teams, complete the following: (Note: This exercise continues File I/O #2) Program must read an unspecified

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

My program is supposed to do this:

Working in teams, complete the following: (Note: This exercise continues File I/O #2)

Program must read an unspecified number of sorted values from a file specified by the user (.txt), and displays the median value (The median is the middle number when the numbers are sorted by size.), average value, and how many numbers were read. (Note: Do not use an array.)

I was stuck on a few lines and wasn't sure how to close the do while loop or the if else statements. Any help is appreciated!

a D 88 h o v2 Psuedocode O v2 Psuedocode a main.cpp > GetFileInfo (itstream & inData) #include #include Buildtime (13) Runtime Ov2 Psuedocode 13 issues Semantic Issue 10 using namespace std; O Use of undeclared identifier 'Get 12 void GetFileInfo (ifstream& inData) 13 14 15 16 17 18 19 20 Median main.cpp string filename 0 Variable has incomplete type void Expected unqualified-id do t cout > filename; main.cpp Use of undeclared identifier Get Number main.cpp Void function 'GetFilelnfo' should not return a value main.cpp if 22 II RESEARCH istream 23 /I Reads and counts values in a file and calculates the average 24 II Pre: inData contains valid ifstream to a file and calculates the average 25 II Post: numCt contains the number of values in file 26 /IAvg contains average of the values o Redefinition of DisplayResults' as different kind of symbol main.cpp Previous definition is here Use of undeclared identifier 'Get Number main.cpp 28 void GetInitialValues (ifstream &inData, int &numCt, float avg) o Use of undeclared identifier "Get 30 Finds and returns the median of float values in a file 31 II Pre: inData links to a file of sorted float values and 32 InumCt contains the number of values 33 I Post: Return median of values read from file 34 5 void GetMedian (ifstream &inData, int &numCt)i Number main.cpp 0 Parse Issue ) Expected 'while' in do/while loop main.cpp To match this 'do 37 void DisplayResults; 38 Variable has incomplete type 'void 0 Use of undeclared identifier 'GetMedian' Expected ') main.cpp To match this '( Expected unqualified-id main.cpp Expected' for function-style cast or type construction main.cpp 40 41 int main) ifstream inData; int numCt ) Expected 'while' in do/while loop main.cpp To match this 'do A Unused Entity Issue @ Filter All Output Filter

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

Discuss the various forms in which wealth can be accumulated.

Answered: 1 week ago

Question

LO4 Provide an overview of four challenges facing HR today.

Answered: 1 week ago