Print the total number of words in the file. Print the total number of different words (case sensitive, meaning “We” and “we” are two different words) in the file. Print all words in ascending order (based on the ASCII code) without duplication. Write a pattern match method to find the location(s) of a specific word (a character string up to twelve characters, e.g. system). This method should return all line number(s) and location(s) of the word(s) found in the file. Print all line(s) with line number(s) of the file where the word is funds by invoking the method of 4). Under each output line indicate the location(s) of the first character of the matched word (refer to the output example below). Empty lines are lines, they also have their own unique line numbers. java Project mytext.txt The total number of word in the file is: 501 The total number of different words in the file is: 465 Words of the input file in ascending order without duplication: // here are output of all words in ascending order without duplication // (the content of this portion is subject to the input text file) Please enter a word to be searched: system Line number 10 complete your computation a 64 bit processor system running Linux Operating System is                                              ^ Line number 487 entire system should be based on a complete software system infrastructure design.        ^                                             ^ Please enter a word to be searched: Albuquerque The word Albuquerque is not found in the text file. Please enter a word to be searched: EINPUT Bye!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
  • Print the total number of words in the file.
  • Print the total number of different words (case sensitive, meaning “We” and “we” are two different words) in the file.
  • Print all words in ascending order (based on the ASCII code) without duplication.
  • Write a pattern match method to find the location(s) of a specific word (a character string up to twelve characters, e.g. system). This method should return all line number(s) and location(s) of the word(s) found in the file.
  • Print all line(s) with line number(s) of the file where the word is funds by invoking the method of 4). Under each output line indicate the location(s) of the first character of the matched word (refer to the output example below).
  • Empty lines are lines, they also have their own unique line numbers.

java Project mytext.txt

The total number of word in the file is: 501

The total number of different words in the file is: 465

Words of the input file in ascending order without duplication:

// here are output of all words in ascending order without duplication

// (the content of this portion is subject to the input text file)

Please enter a word to be searched: system <Enter>

Line number 10

complete your computation a 64 bit processor system running Linux Operating System is

                                             ^

Line number 487

entire system should be based on a complete software system infrastructure design.

       ^                                             ^

Please enter a word to be searched: Albuquerque <Enter>

The word Albuquerque is not found in the text file.

Please enter a word to be searched: EINPUT <Enter>

Bye!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY