Skip to content

CS.4253 Final Exam Alternative

License

Notifications You must be signed in to change notification settings

code-logik/acm-warrior-word-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


ACM Warrior Word Search

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

ACM International Collegiate Programming Contest Adaptation
Windows Programming Final Exam Alternative

Mark Sarasua, Jr.
Rad Alrifai, Ph.D.
CS 4253
Northeastern State University

ACM Warrior Word Search Demo

ACM Warrior Word Search

Table of Contents

  1. Requirements
  2. Rubric
  3. Search Cross Word Problem
  4. Source Build
  5. Usage
  6. License

Requirements

Adapt the ACM Search Cross Word Problem to incorporate a Graphic User Interface and Puzzle Database to demonstrate comprehensive mastery of CS 4253 Windows Programming.

  • Language: C#
  • UI Framework: WPF .NET
  • Database: Microsoft SQL Server
  • Paradigm: Object-Oriented
  • Presentation: In-Class Demonstration Required

Rubric

Code and User Interface Criteria:

  • Produces consistent and accurate input/output results: 40%.
  • Concise, non-repetitive code using advanced syntax and exception handling: 20%.
  • Graphical User Interface is both aesthetically pleasing and functional: 20%.
  • Consistent database connectivity and reliable data retrieval: 20%.

Search Cross Word Problem

(Difficulty Level: Medium)

Word Search

A word search puzzle is a grid of letters where your challenge is to find selected words as formed by consecutive letters in a line along the rows, columns, or diagonals of the grid. Tougher word searches also allow words in the grid to be forwards or backwards in any of those directions. In the “loopy word search,” we will also allow words to go off the edge of the grid and continue (along the same line) on the other side, and potentially even reuse letters from that same word.

However, in this problem, we won’t search for words along diagonal lines, i.e., we only search along the rows and columns. (The UCF programming coaches are sure nice!)

The Problem:
Given a grid of letters and a list of words, identify the location of the first letter of each word in the grid and the direction in which the remaining letters of the word can be found in the sequence.

The Input:
The first input line contains a positive integer, n, indicating the number of word search puzzles. This is followed by the data for these puzzles. The first input line for each puzzle contains two positive integers (separated by a space): r, the number of rows in the grid (between 3 and 12 inclusive), and c, the number of columns in the grid (between 3 and 20 inclusive). Each of the next r input lines for the puzzle contains exactly c uppercase letters, with no spaces. The next input line for each puzzle contains a positive integer s, the number of words to search for. Each of the next s input lines contains a string of uppercase letters (length between 3 and 100 letters, inclusive) which is a word to search for. It is not necessarily a real word in any language. Each of the s words will appear exactly once in the grid, meaning it has exactly one starting location and goes only in one direction. None of the words will be palindromes (same letters backwards and forwards). Assume that the input is valid as described here.

The Output:
For each word search puzzle, output the line “Word search puzzle #p:” where p is the puzzle number (counting from 1 in the input). Then, for each word given in that puzzle (and in the order given), output a line of the form “d r c w” where w is the word, r is the row in the grid where the first letter of the word is located (counting from 1), c is the column in the grid where the first letter is located (counting from 1), and d is the direction where the remaining letters of the word can be found, relative to the first letter, as given below. Output exactly one space after each of d, r, and c. For the direction d, use the following 1-letter codes:

Code Use for words with letters:

  • "R" in the same row that go to the right, into subsequent columns, potentially wrapping to the first column of the same row.
  • "D" in the same column that go down, into subsequent rows, potentially wrapping to the first row of the same column.
  • "L" in the same row that go left, back into previous columns, potentially wrapping to the last column of the same row.
  • "U" in the same column that go up, into previous rows, potentially wrapping to the last row of the same column.

Leave a blank line after the output for each puzzle.

Sample Input:

2  
6 12  
JARWORDEPIDG  
IWAXLOEAHNOK  
KPEPSORTHGIN  
ZASFCOFABEMW  
QEHEZIUSRSTY  
MWCORMNELTOS  
5  
WORD  
SEARCH  
KNIGHTRO  
UNDERFUND  
INGESTING  
3 7  
UCFAEHT  
KNIGHTS  
CODETRY  
2  
AGE  
THETHETHETHETH  

Sample Output:

Word search puzzle #1:  
R 1 4 WORD  
U 4 3 SEARCH  
L 3 1 KNIGHTRO  
D 5 7 UNDERFUND  
D 1 10 INGESTING  
Word search puzzle #2:  
D 1 4 AGE  
U 3 5 THETHETHETHETH  

Adaptation Example:
Adaptation Example


Source Build

Prerequisites:

  • Microsoft SQL Server
  • Microsoft SQL Server Management Studio (SSMS)
  • Visual Studio 2022

To build from source code:

  1. Clone the main branch to your local machine.
  2. Navigate to the src directory.
  3. Execute the file ACMFinalExamProblem_SQL.sql with Microsoft SQL Server Management Studio (SSMS).
  4. Navigate to the ACMFinalExamProblem subdirectory.
  5. Open the ACMFinalExamProblem.sln in Visual Studio 2022.
  6. Update line 18 in the Database.cs file with your SQL Server Name.
  7. Build Solution using Release and Any CPU settings.
  8. Navigate to the Release folder to find the ACMFinalExamProblem.exe.

Usage

How to use ACM Warrior Word Search:

  1. Double-click ACMFinalExamProblem.exe to open the ACM Warrior Word Search program.
  2. Click on any word in the "Words" section to find and highlight it in the puzzle grid.
    The direction, row, and column of the first letter, along with the word, will be listed in the "Output" section.
  3. To close the ACM Warrior Word Search program, simply click on EXIT SEARCH.

Buttons:

  • Use the PREV and NEXT buttons to navigate the puzzles in the Puzzle Database.
  • Use the RAND button to choose a puzzle from the Puzzles Database at random.
  • Use the RESET button to clear the highlighted words in the puzzle grid.

License

ACM Warrior Word Search is licensed under the MIT License.

MIT License

Copyright (c) 2024 Mark Sarasua, Jr. <mark.sarasua@code-logik.com> www.code-logik.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

CS.4253 Final Exam Alternative

Resources

License

Stars

Watchers

Forks