Question: Problem 2 : Mistakes Were Made Extend your scrabble program from Problem 1 to handle one change. The list may include words that cannot be
Problem : Mistakes Were Made
Extend your scrabble program from Problem to handle one change. The list may include words that
cannot be legally placed. All words that cannot be placed should be identified and not added to the board.
Input
The input format is the same as in Problem
Processing
Same as problem except that words that cannot be legally placed should be identified and not placed
on the board. A word cannot be legally placed if one or more of the following conditions hold.
if the word extends past the edge of the board
If the word does not cross one or more other words, except in the case of the first word to be
placed.
If there is a letter mismatch at a crossingpoint of two words. I.e the letter at the crossing point
of the word to be placed is not the same as the letter of crossing point of the already placed word.
If the word can be legally placed, it is added to the board. Otherwise, the program should identify the
illegal word. The program then prints out the board, just like in Problem
Output
As the words are being placed, identify each illegal word by outputting the following:
Invalid word placement:
where and are as described in the Input section of Problem Lastly, output the game board as
in Problem
Examples
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
