Question: Create a class named Frequencycounter The constructor for this class has the following signature FrequencyCounter(String filename) were filename is the name of the file that


Create a class named Frequencycounter The constructor for this class has the following signature FrequencyCounter(String filename) were filename is the name of the file that will be processed. The constructor should process the file and gather all the data required as . described above and store the data in instance fields for the class .Use another ArrayList to keep track of distinct strings and the number of times each one occurs To do this, create another class to hold this data The instance fields of this class should be private, thus you will need to use getter and setter methods e.g., this class will need a String instance field, Count instance field and a length instance field. The ArrayList will be instantiated with this type e.g. if your class was name StringFrequency then the ArrayList declaration would look like this ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
