Java help for computer science!!!?

Java help for computer science!!!?




The board game Scrabble works by assigning points to wooden tiles that are marked with printed letters, and are arranged as interlocking words on a Scrabble board. It's described here: Scrabble.

We'll simplify this considerably, and consider the following question. We begin with the letter-scoring scheme from Scrabble:

a = 1, b = 3, c = 3, d = 2, ..., z = 10.



Given a text file - a novel for example, what is the token in the file with the highest scoring density? Token density is calculated as follows: First, letters are assigned their scrabble score. All non-letters (e.g., period, comma, etc.) have score 0. A token's density equals the sum of the scrabble values of its characters, divided by the length of the token.



Some examples:



Token Score

cab 7/3 = 2.33 (note: standard division, not Java integer division)

cab! 7/4 = 1.75 (token length is now 4, '!' has value 0)

zzz 30/3 = 10.0







Your solution should be in two classes, a driver class called DenseScrabbleTester, which includes main and uses Scanner to identify an external file for dense Scrabble study, and a class called DenseScrabble, which does the heavy lifting for the application. The DenseScrabble class must extend Echo, in the way we've indicated in Chapter 10. Submit the code for these two classes in the boxes below.



Output: your program should report the (or a) highest density token in the input file, along with the density value for that token, and the line number in the file the toke





No Answers Posted Yet.