/*---- signature: main: void -> int purpose: testing program for the function swap compile using: g++ swap_test.cpp swap.cpp -o swap_test run using: ./swap_test by: Sharon Tuttle last modified: 2022-09-28 ----*/ #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include "swap.h" using namespace std; int main() { cout << boolalpha; cout << "*** Testing swap ***" << endl; string name = "Bob"; string moniker = "Monica"; cout << "name is now: " << name << endl; cout << "moniker is now: " << moniker << endl; swap(name, moniker); cout << (name == "Monica") << endl; cout << (moniker == "Bob") << endl; cout << "name is now: " << name << endl; cout << "moniker is now: " << moniker << endl; string course = "CS 112"; string instr = "Tuttle"; swap(course, instr); cout << (course == "Tuttle") << endl; cout << (instr == "CS 112") << endl; return EXIT_SUCCESS; }