Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java word game In most word games, each letter in a word is scored according to its point value, which is inversely proportional to its
java word game
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 E x12, A x9,1 x9, O x8, N x6, R x6. T x6, L x4, S x4, U x4 2 points: D x4. G x3 3 points: B x2, C x2, M x2, P x2 4 points: F x2, H x2. V x2, W x2. Y x2 5 points: K x1 8 points: J x1. X x1 10 points: Q x1,Z xl 1 Word: SYZYG# Scrabble score is: 1+4+ 10 +4+2+0= 21 Name the program: ModifiedScrabbleScoreXX. java, where XX are your initialsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started