subject

The script is to open a given file. The user is to be asked what the name of the file is. The script will then open the file for processing and when done, close that file. The script will produce an output file based on the name of the input file. The output file will have the same name as the input file except that it will begin with "Analysis-". This file will be opened and closed by the script.
The script is to process the file and calculate the following information and output the information to the file in the order presented here.
The script it to count the number of lines, the number of words, and the number of characters in the file and put this information out into the output file with appropriate labels for the reader to know what the numbers are. This information is to be echoed on the screen to the user.
You may find it easier to determine the number of words if you remove the punctuation, digits, and other non letter characters other than spaces before trying to count the words. Those items are not considered to be part of a word. Keep that in mind when referencing words in following instructions.
Count spaces, digits, punctuation and other non letter characters as characters though
The script is produce a list of all unique words in the file and the of times each word appears in the file. This list with frequency counts is to be put in the output file in alphabetical order and one word/frequency pair to a line. The format should be word (frequency count). Be sure there is a space between the word and the beginning parentheses. You will count words that appear only once. Due to the possible length of this list, you are not to echo this list to the screen, only place it in the output file.
The script is to produce a list of 2 word pairs found in the file that appear more than once. If a 2 word pair appears only once, it is not to be put into the output file. The format of the line in the output file should be the two word pair followed by the frequency count in parentheses as seen in the previous item involving unique words. This list is put out after the single word list. There is to be a heading to the list to let the user know that the information is changing and a blank line put in before the heading. This information is to be echoed on the screen to the user.
The last bit of information the script it to place into the output file is the total number of words, the average length of a word, the number of unique words, the average number of letters in the unique words, and the number of word pairs that have frequencies of 2 or more. Properly label each item of information output in this section as well as placing a blank line before the section and giving the section a heading. This information is to be echoed on the screen to the user.
It is fully conceivable that the average number of letters in a word (length of a word) for the over all document is different than the average number of letters in a word for the unique word list. This is because a word such as "the" might appear multiple times in the file. In the first calculation, each instance of the is counted. In the second calculation, the word "the" is only counted 1 time on the list.
The script is to use solid programming practices like comments, self documenting variable names (also known as meaningful variable names) and easy to read and neat code.
You are to place a comment block at the very top of the script containing your name, the semester, the due date of the exam, and the instructor's name each on separate lines.
The logic is built to examine the process incoming data for specific items of information. This may need to be done in specific order with multiple processing steps.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
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, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
You know the right answer?
The script is to open a given file. The user is to be asked what the name of the file is. The script...
Questions
question
English, 21.12.2021 23:50
Questions on the website: 13722360