Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

INTRODUCTION Your professor, likes to watch tv series. One of these shows caught his attention, the speeches seems more enticing to his ears than any

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

INTRODUCTION Your professor, likes to watch tv series. One of these shows caught his attention, the speeches seems more enticing to his ears than any other show he has ever watched before. For some time, he could not figure out the reason for that, until one day he realized that this show had various vocabulary. Acting scenes are full of long speeches, decent acting, and most importantly, certain vocabulary almost never gets repeated in the entire show Your professor, being the nerd, he is, forms a theory, "A show that has the least repeated vocabulary should be ranked among the best shows." The theory states that if story A and story B have the same number of words in them, and story A has less repeated words in it than that of story B, then story A is a better story You are given 4 different stories as text documents of roughly the same size, 4600 words. In this assignment, your professor is asking you to build a tool that loads these stories and prints them in the order of their vocabulary ranks REQUIREMENTS You are given hw5.java below. This class has a main function that invokes two other classes StoryRanker and Story. You are required to write StoryRanker.java and Story.java, and submit them along with hw5.java on blackboard. import java.io.FileNotFoundException; import java.util.Scanner; public class Hw5 public static void main(String[] args) throws FileNotFoundException String user!nput = ""; Scanner in = new Scanner(SysteM.in); System.out.println("Write a file name to include in your ranks, '"?" " + "to list ranks, and! to exit program"); while (luserInput.equals("!")) 1 System.out.print(">> ") userInput = in.next(); INTRODUCTION Your professor, likes to watch tv series. One of these shows caught his attention, the speeches seems more enticing to his ears than any other show he has ever watched before. For some time, he could not figure out the reason for that, until one day he realized that this show had various vocabulary. Acting scenes are full of long speeches, decent acting, and most importantly, certain vocabulary almost never gets repeated in the entire show Your professor, being the nerd, he is, forms a theory, "A show that has the least repeated vocabulary should be ranked among the best shows." The theory states that if story A and story B have the same number of words in them, and story A has less repeated words in it than that of story B, then story A is a better story You are given 4 different stories as text documents of roughly the same size, 4600 words. In this assignment, your professor is asking you to build a tool that loads these stories and prints them in the order of their vocabulary ranks REQUIREMENTS You are given hw5.java below. This class has a main function that invokes two other classes StoryRanker and Story. You are required to write StoryRanker.java and Story.java, and submit them along with hw5.java on blackboard. import java.io.FileNotFoundException; import java.util.Scanner; public class Hw5 public static void main(String[] args) throws FileNotFoundException String user!nput = ""; Scanner in = new Scanner(SysteM.in); System.out.println("Write a file name to include in your ranks, '"?" " + "to list ranks, and! to exit program"); while (luserInput.equals("!")) 1 System.out.print(">> ") userInput = in.next()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

4-57. The employees were represented by Janet Hogan.

Answered: 1 week ago