#include #include "Calculator.h" #include using namespace std; int main( int argc, char** argv ) { string cmd = ""; double value; Calculator calc; cout << "Starting the calculator simulation\n"; cout << "Enter the operation to be performed: "; while(cin) { cin >> cmd; calc.set_command(cmd); if(calc.is_legal_command()) { if(calc.is_trig_command()) { cout << "Enter the angle in degrees: "; cin >> value; cout << "The " << cmd << " of " << value << " is: " << calc.process(value) << endl; } else { cout << "Enter the parameter for the operation: "; cin >> value; cout << "The " << cmd << " of " << value << " is: " << calc.process(value) << endl; } } else { cout << cmd << " is not a legal operation!" << endl; } cout << "Enter the operation to be performed: "; } cout << "\nSimulation complete" ; return 0; }