Please Use C++ Language. Thank you. Please I need the actual code. Donot post psudocode!!
And also I have codes but just donot work so make sure that it works.
Requested files: CrosswordGenerator.cpp, CrosswordGenerator.h, CrosswordGenerator_test.cpp
CrosswordGenerator - Write a program that helps to generate a crossword puzzle by organizing words that share letters.
For this assignment, you will write a program that forms the basis of a crossword puzzle generator. In order to create a crossword puzzle you need to identify letters that are common to one or more words. This program helps you generate crossword puzzles by identifying letters that are common to several words and string them in an intermediate data structure.
Using intermediate data structures is one way to simplify your coding. You create a data structure that organizes your input so the final output is easier to create. Your CrosswordGenerator program will open a file containing a list of words. To prepare for crossword puzzle generation your code should implement the following pseudo code:
Non-alphabetic characters should be ignored.
Upper and lower case letters should be equivalent. Your program should not treat them as distinct tokens.
The order of shared letters is not a consideration for this program.
N.B.
Example of what sharedLetters() output.
SharedLetters(transaction,dictum) returns "tci"
SharedLetters(Transaction,kudzu) returns ""
If "transaction" is stored in wordArray[12] and "dictum" is stored in wordArray[33] then wordsIntersect[12][33] will contain "tci"
if "kudzu" is stored in wordArray[78] then wordsIntersect[12][78] will contain ""
Hi Go through this code here i have a used a mtarrix of 5,5 jst add a code of taking input from file and count the chracters and define the size of mattix as the count
#include <iostream>
using namespace std;
using std::cout;
using std::endl;
int main()
{
int k, length, startCol, startRow, endCol, endRow; bool
found;
char c[5][5] = {{'p', 'k', 'q', 'a', 'h'},
{'s', 'n', 'o', 'w', 'y'},
{'l', 'o', 'l', 'a', 'd'},
{'x', 't', 'o', 'y', 's'},
{'v', 's', 'c', 'x', 'g'}};
int n;
for (int i=0; i<5; i++) { for (int j=0; j<5; j++) { cout
<< c[i][j] << " "; }
cout << endl; }
cout << "Please select a word to search for; hit 1 for
'snow', 2 for 'lola', 3 for 'away', 4 for 'toys', or 5 for 'knot':
" << endl;
cin >> n;
if (n == 1)
{
char word[5] = "snow"; found = false; k = 0; length = 4;
for (int i=0; i<5; i++) { for (int j=0; j<5; j++) { if
(c[i][j] == word[k]) { if (k == 0) {startCol = j; startRow =
i;}
else if (k == length - 1) { endCol = j; endRow = i; found = true;}
k++;} else k = 0; }
if (found) { break;} }
if (found) { cout << "The word " << word << "
starts at (" << startCol << ", " << startRow
<< ") and ends at (" <<
endCol << ", " << endRow << ")" << endl; }
system ("PAUSE");
}
else if (n == 2)
{
char word[5] = "lola"; found = false; k = 0; length = 4;
for (int i=0; i<5; i++) { for (int j=0; j<5; j++) { if
(c[i][j] == word[k]) { if (k == 0) {startCol = j; startRow =
i;}
else if (k == length - 1) { endCol = j; endRow = i; found = true;}
k++;} else k = 0; }
if (found) { break;} }
if (found) { cout << "The word " << word << "
starts at (" << startCol << ", " << startRow
<< ") and ends at (" <<
endCol << ", " << endRow << ")" << endl; }
system ("PAUSE");
}
else if (n == 3)
{
char word[5] = "away"; found = false; k = 0; length = 4;
for (int j=0; j<5; j++) { for (int i=0; i<5; i++) { if
(c[i][j] == word[k]) { if (k == 0) {startCol = j; startRow =
i;}
else if (k == length - 1) { endCol = j; endRow = i; found = true;}
k++;} else k = 0; }
if (found) { break;} }
if (found) { cout << "The word " << word << "
starts at (" << startCol << ", " << startRow
<< ") and ends at (" <<
endCol << ", " << endRow << ")" << endl; }
system ("PAUSE");
}
else if (n == 4)
{
char word[5] = "toys"; found = false; k = 0; length = 4;
for (int i=0; i<5; i++) { for (int j=0; j<5; j++) { if
(c[i][j] == word[k]) { if (k == 0) {startCol = j; startRow =
i;}
else if (k == length - 1) { endCol = j; endRow = i; found = true;}
k++;} else k = 0; }
if (found) { break;} }
if (found) { cout << "The word " << word << "
starts at (" << startCol << ", " << startRow
<< ") and ends at (" <<
endCol << ", " << endRow << ")" << endl; }
system ("PAUSE");
}
else if (n == 5)
{
char word[5] = "knot"; found = false; k = 0; length = 4;
for (int j=0; j<5; j++) { for (int i=0; i<5; i++) { if
(c[i][j] == word[k]) { if (k == 0) {startCol = j; startRow =
i;}
else if (k == length - 1) { endCol = j; endRow = i; found = true;}
k++;} else k = 0; }
if (found) { break;} }
if (found) { cout << "The word " << word << "
starts at (" << startCol << ", " << startRow
<< ") and ends at (" <<
endCol << ", " << endRow << ")" << endl;
}
system ("PAUSE");
}
return 0; system ("PAUSE");
}
Please Use C++ Language. Thank you. Please I need the actual code. Donot post psudocode!! And...
C Language program. Please follow the instructions given. Must use functions, pointers, and File I/O. Thank you. Use the given function to create the program shown in the sample run. Your program should find the name of the file that is always given after the word filename (see the command line in the sample run), open the file and print to screen the contents. The type of info held in the file is noted by the word after the filename:...
Please Use C++ Language. And Note that please donot post the answer already there Because there is similar answer code but I need with modified Quick sort algorithm . Update your program from ... Create an array that holds 1000 random integers between 1-1000. Allow the user to enter an integer to search. Create and implement modified Quick sort algorithm which will sort the array before the Binary Search algorithm is executed. Create and implement a Binary Search Algorithm ....
Hello, I need to implement these small things in my C++ code. Thanks. 1- 10 characters student first name, 10 characters middle name, 20 characters last name, 9 characters student ID, 3 characters age, in years (3 digits) 2- Open the input file. Check for successful open. If the open failed, display an error message and return with value 1. 3- Use a pointer array to manage all the created student variables.Assume that there will not be more than 99...
This is for C programming: You will be given files in the following format: n word1 word2 word3 word4 The first line of the file will be a single integer value n. The integer n will denote the number of words contained within the file. Use this number to initialize an array. Each word will then appear on the next n lines. You can assume that no word is longer than 30 characters. The game will use these words as...
The language is C++. Code needs to be added to line 28 and 37. Could someone provide some help with how to do it? CODE Write a program to unscramble words A file with list of words is provided along with a template program to get you started. 1. Define a struct with 2 string members: sorted and original 2. Declare an array of 200000 elements with data type of the struct 3. Read from a file a list of...
//I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which manipulates text from an input file using the string library. Your program will accept command line arguments for the input and output file names as well as a list of blacklisted words. There are two major features in this programming: 1. Given an input file with text and a list of words, find and replace every use of these blacklisted words with the string...
Write a C program that takes two sets of characters entered by the user and merge them character by character. Enter the first set of characters: dfn h ate Enter the second set of characters: eedtecsl Output: defend the castle Your program should include the following function: void merge(char *s3, char *s1, char *s2); The function expects s3 to point to a string containing a string that combines s1 and s2 letter by letter. The first set might be longer...
Assignment 1 In this assignment you will be writing a tool to help you play the word puzzle game AlphaBear. In the game, certain letters must be used at each round or else they will turn into rocks! Therefore, we want to create a tool that you can provide with a list of letters you MUST use and a list of available letters and the program returns a list of all the words that contain required letters and only contain...
Hello I need a small fix in my program. I need to display the youngest student and the average age of all of the students. It is not working Thanks. #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <algorithm> using namespace std; struct Student { string firstName; char middleName; string lastName; char collegeCode; int locCode; int seqCode; int age; }; struct sort_by_age { inline bool operator() (const Student& s1, const Student& s2) { return (s1.age < s2.age); // sort...
SCREENSHOTS ONLY PLEASE!!! DON'T POST ACTUAL CODE PLEASE LEAVE A SCREENSHOT ONLY! ACTUAL TEXT IS NOT NEEDED!!! mystring.h: //File: mystring1.h // ================ // Interface file for user-defined String class. #ifndef _MYSTRING_H #define _MYSTRING_H #include<iostream> #include <cstring> // for strlen(), etc. using namespace std; #define MAX_STR_LENGTH 200 class String { public: String(); String(const char s[]); // a conversion constructor void append(const String &str); // Relational operators bool operator ==(const String &str) const; bool operator !=(const String &str) const; bool operator >(const...