Create a java class namedtextprocessorgui

Assignment Help JAVA Programming
Reference no: EM13896103

A class named TextProcessor. This class does the heavy lifting of opening the file, reading it, standardizing the text, and tokenizing it. Use this class to accomplish the following requirements:

  1. Create a Java class namedTextProcessorGUI.
  2. Provide a main() function that creates and displays an instance ofTextProcessorGUI. I recommend you write this class as a subclass ofJFrame.
  3. Provide a button that, when pressed, causes aJFileChooser dialog to appear. Use this dialog to allow the user to select a text file.
  4. After selecting the file, your code will create an instance of TextProcessor and then use itsprocessFile() method.
  5. After theprocessFile() method completes, display in your window:
    1. The name of the selected file.
    2. The number of unique words in the file as provided byTextProcessor.
    3. The total number of words in the fileas provided byTextProcessor.
    4. The average number of times a word appears in the fileas provided byTextProcessor.
    5. The most frequent words (it could be a tie)as provided byTextProcessor.
    6. The COUNT of words that appear onceas provided byTextProcessor.
    7. The COUNT of words that appear twiceas provided byTextProcessor.
    8. The COUNT of words that appear three timesas provided byTextProcessor. 

Your window must be appropriately sized for its contents. Further, your program must terminate when I press the "DISMISS" button, i.e. the X in the upper right corner on a Windows system.

When I grade your homework, I will use two different text files. Your code must correctly handle the use of one text file (show the numbers for the first file), then the use of a second text file (show the numbers for the second file).

I recommend you pick a few books from Project Gutenberg. Works by Oscar Wilde, Lewis Carroll, and Mark Twain are good test data; easy to get, moderate in length, and they use pretty standard vocabulary. But you can use whatever test data you want.

This exercise is about creating a GUI. This exercise is NOT about handling a file and the text within. 

An answer by sometime (doesn't matter when) tomorrow is needed

Reference no: EM13896103

Questions Cloud

Describe life under the division of labor : Compare and contrast the way that Marx and Weber describe life under the division of labor and the capitalist mode of production
What does sampling distribution mean : What does sampling distribution mean and how is a sampling distribution of the mean obtained?
Why may the reputation mechanism break down under monopoly : Why may the reputation mechanism break down under monopoly? Why can the reputation mechanism be reinforced by competition?
What is the simple logic of warranties as a quality signal : What is the simple logic of warranties as a quality signal? What limits the attractiveness of warranties as a signal for high-quality firms?
Create a java class namedtextprocessorgui : Create a Java class namedTextProcessorGUI. Provide a main() function that creates and displays an instance ofTextProcessorGUI. I recommend you write this class as a subclass ofJFrame.
How can a random sample be obtained : Using a table of random numbers, obtain a random sample of 10 from the 95 employees of a plant that were out sick during a particular day.
Lujack co. held the following short term available : On December 31, 2013, Lujack Co. held the following short term available for sale securities.
Do repeat purchases facilitate or hinder advertising signals : Consider a market in which product quality does not affect marginal costs. Do repeat purchases facilitate or hinder advertising signals?
Requests the user to enter a value : Requests the user to enter a value, and searches the array to find a matching value. If there is a match, display Match; otherwise, display No Match.Display only one message at the end of the search.Write the code so the search stops when a match is ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Each instance of this class will represent one book a book

each instance of this class will represent one book. a book consists of the title of the book a string and the authors.

  Solve computer science java validation problem

Computer Science, Operating Systems - Year 1Description:java validationProblem: Using NetBeans 7.2

  Write a recursive method to print all permutations of string

Write a recursive method to print all the permutations of a string. For instance, for a string abc, the printout is: abc acb bac bca cab cba

  Write an application that uses an array to store

Write an application that uses an Array to store 10 messages of type String - You will store this Array with 10 messages

  Prepare a polynomial-time algorithm

Write a polynomial-time algorithm that, given an initial configuration (P_1, P_2, ..., P_k), decides if it is a winning configuration - Prepare a polynomial-time algorithm that decides if it is a winning configuration.

  Create a japplet that contains a jlabel and jbutton

Create a JApplet that contains a JLabel and JButton -  create an HTML document to host the applet, set the Width to 450 and the Height to 200. Save as TestJChangeFont.html.

  Which a ball is released from a user-defined height

Write a program in which a ball is released from a user-defined height and free-falls to the ground. The ball is pulled by earth's gravity of 9.8 m/sec 2 . Assume that each pixel represents

  Display random numbers to simulate rolling a die

1. Display random numbers to simulate rolling a die2. Create a java program that simulate a casino game. (rollin a die)

  Mvc pattern and servlet

When you use the MVC pattern, the controller directs the flow of control to

  1 ra row your boatprepare a world with a boat a person

1. ra row your boatprepare a world with a boat a person sitting in the boat an island and a pier located 25 meters from

  Technical community blog

Write a blog article for a coding and technical community blog.

  Explore how to throw and rethrow and exception

We will explore how to throw and rethrow and exception, and how to handle events in a program.  Please respond to all of the following prompts:Discuss whether it is it possible

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd