Question: Please complete both functions below in c++: ========================================================================================== #include #include #include #include using namespace std; // Declaration of struct for Statistics. Do not modify. struct

Please complete both functions below in c++:

==========================================================================================

#include #include #include #include

using namespace std;

// Declaration of struct for Statistics. Do not modify.

struct Statistics { int wordCount; int longestWord; int shortestWord; int numChars; };

// Declarations of functions in GivenFunctions.cpp. Do not modify.

void toCString (string s, char c[]); void displayText (string message, string title); void displayText2 (char s[], char title[]); bool isLetter (char ch); void toUpperCase(char s[]); void toLowerCase(char s[]); int getCharacters(char data[], char filename[]); int getWord (char data[], int start, char word[]); char byteToChar (int bits[]); void charToByte (int bits[], char ch);

// Declarations of functions for Assignment #2. Do not modify.

void encrypt (char document[], char filename[]); void decrypt (char document[], char filename[]); int readWordsDictionary(string dictionary[]); int checkSpelling (string dictionary[], int numWords, char document[], int start, char errorWord[]); int checkSpellingAll (string dictionary[], int numWords, char document[], string errorWords[]); int searchWord (char document[], int start, char keyWord[]); Statistics getStatistics (char document[]);

// This function accepts two C-string parameters, document and filename. // It opens the file specified by filename. It then encrypts each character // in the document C-string using the encryption algorithm and stores it // in the file.

void encrypt (char document[], char filename[]) {

displayText ("Encrypting ...", "Encrypt"); }

// This function accepts two C-strings as parameters, document and filename. // It opens the file specified by filename. It reads each character from the // file and stores it in the document C-string. The characters in the // document C-string are then decrypted using an algorithm that reverses the // encryption algorithm. void decrypt (char document[], char filename[]) { displayText ("Decrypting ...", "Decrypt"); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!