Question: PLEASE Help in java!!! Your program will open the *wordpuzzle.dat* file. The first portion contains the search words, a three asterisk divider and the lines

PLEASE Help in java!!!

Your program will open the *wordpuzzle.dat* file. The first portion contains the search words, a three asterisk divider and the lines for the word search puzzle.

//search words needles

computer

plum

copy

chair

friday

ferret

*** //three asterisk divider

Gypocriahc //lines for the word search haystacks

ferretmulp

computerfo

vrlyplumoo

yupterreff

moyadirfoy

cpzcopysvj

chairbidoq

```

The following words can be found in the forward horizontal direction

| word | row | column |

| --------- |:----- :|:------ :|

| computer | 3 | 1 |

| plum | 4 | 5 |

| copy | 7 | 4 |

| chair | 8 | 1 |

| ferret | 2 | 1 |

The following word can't be found in the horizontal forward direction.

The following table shows a *-1* as the result because the word wasn't

found.

| word | row | col |

| --------- |:-----:|:------:|

| friday | -1 | -1 |

## Getting started

  • Open the wordpuzzle.dat file using a try catch statement
  • Load the search words into an array called needles (of size 6)
  • Load the puzzle lines into an array called haystack (of size 8)
  • Sort needles using Arrays.sort
  • For each word in needles, search through the haystack using array and string functions to see if it is hidden in the haystack.

When found, your message must say for example word computer was found

At row 3 and column 1.

If a word is not found, output the following:

*friday was not found*

Make sure to search the entire puzzle for all the words.

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!