// strMach-client.cpp // simple client for strMachine class #include #include "StrMachine.h" using namespace std; int main(){ strMachine m1; string s1; //prompt and read string cout << "enter s: "; m1.enter(); //store original user input s1 = m1.getStr(); //simple tests to get started //cout << "s1 = " << s1 << endl; //cout << "isVowel(s1[0]) = " << boolalpha << m1.isVowel(s1[0]) << endl; while(cin){ cout << "m1.s = " << m1 << endl; //test strRev() cout << "m1.strRev() = " << m1.strRev() << endl << "m1.s = " << m1.getStr() << endl; //test zapPunct() cout << "m1.zapPunct() = " << m1.zapPunct() << endl << "m1.s = " << m1 << endl; //test strToUpper() cout << "m1.strToUpper() = " << m1.strToUpper() << endl << "m1.s = " << m1 << endl; //test isPal cout << "user input: " << s1 << endl << "m1.isPal() = " << boolalpha << m1.isPal() << endl << endl; //prompt and read string cout << "enter s: "; m1.enter(); //store original user input s1 = m1.getStr(); } //extra credit-- PigLatin function //cout << "wordToPLatin(s1) = " << m1.wordToPLatin(s1) << endl; cout << endl << "Exiting.." << endl; return 0; }