Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

ISBN: 0262660709, 978-0262660709

More Books

Students also viewed these Databases questions

Question

3. You can gain power by making others feel important.

Answered: 1 week ago