Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I been confused on this for 3 days can you help me. It is a java program. I am confused on how to use the

I been confused on this for 3 days can you help me. It is a java program. I am confused on how to use the filereader, making 2d arrays, the clue class, and overall to get the output looking like that.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Please read the entire document before starting. General Instructions Write a program to play a beginers-level crossword puzzle game. The goal of the game is to guess cach word. Wonls are placcel cither horizontally (left to right) or vertically (top to bottom). The program is "beginners-level" because it verifes ench word you enter, making it imposible to commit a wrong entry to the board. An example game, including use input, is shown below. Your program doos not necd fo match the output below, However, it should have similar functionality. Special Instructions The program will read a pazale from a text file. This file has a specific format that must be followed, to ensure compatibility acrogs all programs. The first line of the file should contain the dimensions of the purde and the number of clues in the format: - Number of rows (integer) - Number of columns (integer) - Number of clues (integer) Subsequent lines is the tile should contain the word clues in the format: - Orientation (H for horimonal or V for vertical) - Row number (starting from 1) - Colaman number (starting from 1) - Solution word (epaces are not allowed as part of the nolation word) - The clase (which may contain multiple words). Uioe a two-dimenodianal array of charactes to atore the current state of the puzzle. In the array, atore the for solved words. An the gane is playod, update this array bued on mor inpat. Other thingr to note: - You must crente a user defined elines called clue. This eless should haw the followiris information if at a minimum): - The woed (le- answer) - The clue that describe the wasl. Use a two-dimensional array of characters to store the current state of the puzzle. In the array, store the ' character to denote non-game squares, the underscore'.' character for blank spaces, and A-Z characters for solved words. As the game is played, update this array based on user input. Other things to note: - You must create a user defined class called clue. This class should lave the following information ( at a minimum): - The word (Le. answer) - The clue that describeg the word - Starting row where this word can be fouid - Starting column where this word can be found - Whether the word is horizontal ('H') of vertical ('V') - Whether this word has been found (true) or not found (falne) - You must use methods. The actual division of the program into methods/functions is up to yout. - You game logic should be case insensitive when comparing the user entry to the correct word. The String method equalaIgnoreCase() may be helpful here. - All source files must be commented, including a header similar to the one be-low. Requirements As part of your submission, you should create a test that demonstrates a user can play the game using keyboard input as well as file driven input. i.e. 1. A sample crossword puzzle file with dimensions of at least 1515 and at least 10 words to solve. 2. A sample human input file that contains test values that a human would enter on the keyboard. (See the link below "Other puzzles" for additional puzzles you can use to text your proyman) Sample Input file 5.56 H I I BA Sheep sound H 31 SOL.10 Neither liquid nor ges H. 5 . 3 WIT Humor Y 11 BLS Road passebger trankport v 1.3 ALLOA To permit. V 35 DOT Point Sample Human input file Figure 1: croosword.puzale, 5.5.human txt Current Puzzle: 12345 Unsetved Clues: \begin{tabular}{|c|c|c|c|} \hlinet & ourection & Row/Cot & ctue \\ \hline 8 & n....... & w..... & \\ \hline 1 & Mordzobtal & 1/1 & Snete sound \\ \hline 2 & Hor120ntal & 3/2 & Neither Liquid nor gas \\ \hline 3 & moritentat & 5/3 & Manor: \\ \hline 4 & Vertical & 1/1 & Qsad pestenger tresspart \\ \hlines & Vertical & 1/3 & to persit \\ \hline s & vertical & 3/5 & Point \\ \hline \end{tabular} Eater ctue to sotve; or i 1 to extt: I Curreat Puzzle: Unsotved Clues: \begin{tabular}{|c|c|c|} \hline & Direction & Row/Co \\ \hline - & ....... & . \\ \hline 2 & Horizontal & 3/1 \\ \hline 3 & Horizontal & 5/3 \\ \hline 5 & Verticat & 2/3 \\ \hline 6 & Vertical & 3/5 \\ \hline \end{tabular} Clve .... Nelther liquid nor gas Huner To perait Point Enter olve to solve, on -1 to exit: 5 Enter your solution: ottor Curreat Puzzle: 12345 \begin{tabular}{|c|c|c|c|} \hline 118 & A & A & = \\ \hline 210 & = & L & = \\ \hline 315 & & i & \\ \hline & " & 0 & " \\ \hline \end{tabular} Unetwes clees

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: 3

blur-text-image

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

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions