Question: Java program How would I write this program? In most word games, each letter in a word is scored according to its point value, which

Java program

How would I write this program?

Java program How would I write this program? In most word games,

In most word games, each letter in a word is scored according to its point value, which is inversely proportional to its frequency in English words. In Scrabble, the points and letter distribution are allocated as shown in the table. Write a Java program that reads in a word (not a sentence) and prints out the score in Scrabble, not counting any other bonuses that occur in the game. Make sure the program handles blank tiles. Represent a blank tile with a #. For example, the Scrabble word "FARM"is worth 9 points: 4 for the F, 1 each for the A and the R, and 3 for the M. However, the word SYZYGY-should be worth: 1 + 4 +10+ 4 + 2 + 0 = 21 points since Y is only found twice a blank tile must be used. Check for the proper number of tiles- assume a maximum of seven letters on a rack as well as ignore any characters other than uppercase letters in computing the score. Output should look similar to below. Sample Run: Enter a word: SYZYGY English-language editions of Scrabble contain 100 letter tiles, in the following distribution: 2 blank tiles 1 point: E Times 12, A Times 9, 1 Times 9, O Times 8, N Times 6, R Times 6, T Times 6, L Times 4, S Times 4, U Times 4 2 points: D Times 4, G Times 3 3 points: B Times 2, C Times 2, M Times 2, P Times 2 4 points: F Times 2, H Times 2, V Times 2, W Times 2, Y Times 2 5 points: K Times 1 8 points: J Times 1, X Times 1 10 points: Q Times 1, Z Times 1 Word: SYZYG# Scrabble score is: 1 + 4 + 10 + 4 + 2 + 0 = 21 Name the program: ModifiedScrabbleScoreXX.java, where XX are your initials

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!