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 2: Mistakes Were Made
Extend your scrabble program from Problem 1 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 1.
Processing
Same as problem 1, 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 crossing-point 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 1.
Output
As the words are being placed, identify each illegal word by outputting the following:
Invalid word placement: (x,Y)D,S
where x,Y,D, and S, are as described in the Input section of Problem 1. Lastly, output the game board as
in Problem 1.
Examples
 Problem 2: Mistakes Were Made Extend your scrabble program from Problem

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!