Question: Hello, can you help me solve this Java project, thanks a lot! Overview The board game Scrabble works by assigning points to wooden tiles arranged


Hello, can you help me solve this Java project, thanks a lot!
Overview The board game Scrabble works by assigning points to wooden tiles arranged in cells on a board. It's described here: Scrabble on Wikipedia For this project, you will write code that computes the Scrabble score for each line of text in a file and reports the line with the maximal Scrabble score and that score Learning objectives 1. Use inheritance to leverage the code provided in a superclass to perform a task (opening and reading in the lines of a text file) 2. Writing code that conforms to a specification. 3. Developing code that will work with existing code 4. Creating code that correctly implements an algorithm as specified. 5. Making essential use of a data structure (array) in your code to implement an algorithm. 6. Gaining further experience developing code incrementally: writing a small amount of code and then testing 7. Gain further experience writing modular code: writing methods that perform small tasks in service of the larger task Computing the Scrabble Score The Scrabble score for a line of text is the sum of the scores for all of the individual characters in that line. The Scrabble score for a single character is computed as follows: For each character in the line 1. If the character is a letter, get the letter score. If it is not a letter, its score is zero. The case of the letter (upperllower case) does not matter. 2. If the position of the character (position is its index- the first character is position 0) is divisible by 4, the score is doubled. 3. If the position of the character is divisible by 9, the score is tripled. 4. If the position of the character is divisible by 4 and 9, the score is doubled. This table lists the Scrabble letter scores B C D E F G H L M N O P Q R S T U Score 3 3 2 1 4 2 4 1 85 1 3 1 1 3 10 1 1 1 1 4 4. 8 4 10 For example, given this line of text Dave, I am afraid. The Scrabble score for tha line would be: 38 Note that the first position of the input s is ze which is divisible by 4 and 9, so the character score for the first letter, D which is 2, is doubled. Another example: this line now is the time has a Scrabble score of 29 Overview The board game Scrabble works by assigning points to wooden tiles arranged in cells on a board. It's described here: Scrabble on Wikipedia For this project, you will write code that computes the Scrabble score for each line of text in a file and reports the line with the maximal Scrabble score and that score Learning objectives 1. Use inheritance to leverage the code provided in a superclass to perform a task (opening and reading in the lines of a text file) 2. Writing code that conforms to a specification. 3. Developing code that will work with existing code 4. Creating code that correctly implements an algorithm as specified. 5. Making essential use of a data structure (array) in your code to implement an algorithm. 6. Gaining further experience developing code incrementally: writing a small amount of code and then testing 7. Gain further experience writing modular code: writing methods that perform small tasks in service of the larger task Computing the Scrabble Score The Scrabble score for a line of text is the sum of the scores for all of the individual characters in that line. The Scrabble score for a single character is computed as follows: For each character in the line 1. If the character is a letter, get the letter score. If it is not a letter, its score is zero. The case of the letter (upperllower case) does not matter. 2. If the position of the character (position is its index- the first character is position 0) is divisible by 4, the score is doubled. 3. If the position of the character is divisible by 9, the score is tripled. 4. If the position of the character is divisible by 4 and 9, the score is doubled. This table lists the Scrabble letter scores B C D E F G H L M N O P Q R S T U Score 3 3 2 1 4 2 4 1 85 1 3 1 1 3 10 1 1 1 1 4 4. 8 4 10 For example, given this line of text Dave, I am afraid. The Scrabble score for tha line would be: 38 Note that the first position of the input s is ze which is divisible by 4 and 9, so the character score for the first letter, D which is 2, is doubled. Another example: this line now is the time has a Scrabble score of 29
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
