subject

Write a function named lineStats. The function lineStats takes three parameters: 1.inFile, a string that is the name of an input file 2.outFile, a string that is the name of an output file 3.threshold, an int that is the length above which a word is considered significant The function lineStats should read and analyze each line of the input file and write two statistics, separated by a space, about the line to a corresponding line of the output file. The two statistics for each line are: 1.the number of words 2.the number of distinct significant words (that is, words longer than threshold) Hint: if a word occurs more than once on a line it counts as a single word. Upper and lower case characters are considered the same ('Word' and 'word' are the same word). The input file contains only upper and lower case letters and white space. For example, if the file fish. txt contains the following lines: Yes some are red and some are blueSome are old and some are newThen the function call: lineStats('fish. txt', 'fishOut. txt', 3)should produce an output file fishOut. txt with the following content: 8 27 1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
question
Computers and Technology, 24.06.2019 07:00
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
You know the right answer?
Write a function named lineStats. The function lineStats takes three parameters: 1.inFile, a string...
Questions
question
Mathematics, 12.02.2021 20:10
question
Mathematics, 12.02.2021 20:10
question
Mathematics, 12.02.2021 20:10
question
Mathematics, 12.02.2021 20:10
question
Mathematics, 12.02.2021 20:10
question
Mathematics, 12.02.2021 20:10
Questions on the website: 13722363