Question: please help in Java Task 2 (60 points) You are given a text file named pg100 . txt. Create a Java class WordCount. In this

please help in Java
please help in Java Task 2 (60 points) You are given a

Task 2 (60 points) You are given a text file named pg100 . txt. Create a Java class WordCount. In this class, a) (25 points) Create a function to read in the text file and count how many lines there are in the text file. b) (25 points) Create a function that receives in a string containing words that are separated by comma. For example, the input string "Welcome,to,Java" contains 3 words that are separated by comma. This function will count how many times each word in the input string appears in the text file (i.e., pg100. txt). For example, we want to count how many times the words "Welcome", "to", "Java" appear in the text file. This function will write all word counts to a file named wordCount. csv. In this file, each line contains a word and an integer (separated by a space) that is the number of times that word appears in the text file. c) (10 points) Create a main function to properly call functions that you created

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!