Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Scrabble Point Calculator (this is NOT a full game of Scrabble) Purpose - to practice File manipulation String manipulation Arrays (possibly, depends on how to
Scrabble Point Calculator(this is NOT a full game of Scrabble)
Purpose - to practice
- File manipulation
- String manipulation
- Arrays (possibly, depends on how to set up your logic)
- Switch/Case (possibly, depends on how you set up your logic)
- Challenging Logic
- Dialog Input and Output
- Methods
- KISS
Problem Statement
Code a Java program to calculate the value of a word based on the letters and double or triple bonuses.
Letter Values:
0 points: blank
1 point: E, A, I, O, N, R, T, L, S, U
2 points: D, G
3 points: B, C, M, P
4 points: F, H, V, W, Y
5 points: K
8 points: J, X
10 points: Q, Z
- Ask the user to enter a word.
- Use dialog boxes for the user inputs.
- Randomly generate one of the following possibilities. You must use these probabilities.
- No bonus (136/196)
- Double word (16/196)
- - Double letter(24/196) - apply this to a random letter in the user's word.
- Triple word (8/196)
- - Triple letter(12/196) - apply this to a random letter in the user's word.
- Tell the user if they got a bonus, what bonus they got and the points
- Output the random number, so I can see what you generated
- Calculate and display the value of the word
- Show the letter and points for each letter as you add up the value of the word
- Add the word and its value into a .txt file namedgameWord.txt. Accumulate these in the .txt file as long as the user continues to play.
- Continued allowing the user to enter words, until they say they are done.
- At the end, output
- all the words the user entered and their values from your gameWords.txt file
- Number of words played
- Grand total of all the word values
- Add several methods, as you think are appropriate in the program.
- Validateeverythingthe user enters.
- Add copious comments, so that I can follow your logic.
Step 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