/*----
  signature: swap: string& string& -> void
  purpose: expects two string arguments THAT CAN BE
      CHANGED, has the side-effect of SWAPPING
      the values of those arguments, and returns
      nothing.

  tests:
      for:
      string name = "Bob";
      string moniker = "Monica";

      swap(name, moniker);

      afterwards,
      name == "Monica"
      moniker == "Bob"

      for:
      string course = "CS 112";
      string instr = "Tuttle";

      swap(course, instr);

      course == "Tuttle"
      instr == "CS 112"

  by: Sharon Tuttle
  last modified: 2022-09-27
----*/

#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;

void swap(string& str1, string& str2) 
{
    string temp;

    temp = str1;
    str1 = str2;
    str2 = temp;
}