filmov
tv
wordpuzzle entire JAVA assignment | Programming Concepts and Methodology Lab 3

Показать описание
Other Programming Concepts and Methodology labs:
Lab description:
//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
Load the search words into an array called needles (of size 6)
Load the puzzle lines into an array called haystack (of size 8)
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.
## Collaboration
Work with your partner to complete the program
Lab description:
//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
Load the search words into an array called needles (of size 6)
Load the puzzle lines into an array called haystack (of size 8)
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.
## Collaboration
Work with your partner to complete the program