Word puzzle, Computer Engineering

You are required to make a class of WordPuzzle, which is basically a game of finding words inside a 2d-array of characters. The class needs to take rows and columns as arguments and allocate a character array of required dimensions. The character array is then to be filled with the 2d-array provided in the input file.

The class should also contain findWord function, which should take a word and check if the word appears HORIZONTALLY or VERTICALLY in the array. The starting position of the word should be returned by a call to a separate function get Position. Following is a simple class definition for you to start with.

class WordPuzzle{
public:
// constructor - also initializes array with random characters
WordPuzzle (int rows, int cols);
// find the specified word in the 2d-array
bool findWord (char *word);
// gets the position of the word last found
bool getPosition (int& row, int& col , char& dir);
private:
// whatever you need
}

Input/ Output Requirements: There is one input file for this problem, which contains dimension (row, col) in the first line. The second line contains the given 2dArray of characters. This will be followed a list of words line by line. The output file contains the word, position and direction line by line as in the input file.

Posted Date: 3/13/2013 6:56:22 AM | Location : United States







Related Discussions:- Word puzzle, Assignment Help, Ask Question on Word puzzle, Get Answer, Expert's Help, Word puzzle Discussions

Write discussion on Word puzzle
Your posts are moderated
Related Questions
What is automated information system Using this automated information system affords below benefits to the company and customers: -  System can be linked into websites to g

What is .NET / .NET Framework?  It is a Framework in which Windows applications might be developed and run. The Microsoft .NET Framework is a platform for building, deploying,

Question: The abundance of resources and the ease of access to cloud computing can help to bridge the gap the resource gap for mobile computing. Nevertheless some fundamental c

What is MMX Technology MMX Technology: MMX (Multimedia extensions) technology adds 57 new instructions to instruction set of Pentium - 4 microprocessors. MMX technology also

Properties : 1.  Monetary Value: Monetary value must be backed by also cash, bank - authorized credit cards or bank certified cashier's cheque. 2.  Interoperability: E-cash

Scoreboards- Constrained-Random Verification Methodology Scoreboards are used to verify that data has successfully reached its destination whereas monitors snoop the interfaces

Any system able of run Gnome 2, KDE 3.2, Windows 2000, Mac OS X and later versions should be capable to run GIMP. GIMP's biggest appetite is for memory and how much you will requir

LoadRunner works by making virtual users who take the place of real users operating client software, such as sending requests using the HTTP protocol to IIS or Apache web servers.

The data structure required to convert a recursion to an iterative procedure is  Stack is the data structure required to convert a recursion to an iterative procedure

Java Database Connectivity (JDBC) With two different types of technologies available in the market today viz., the Windows and the Java technologies developed by the Microsoft