Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a Simple Calculator C + + 2 program. I provided a screenshot of the instructions for this program. Read it carefully. The Code

This is a Simple Calculator C++2 program. I provided a screenshot of the instructions for this program. Read it carefully. The Code I'll provide with comments read them carefully with the corresponding code provided on the screenshot. Driver.cpp #include "SimpleCalc.h"
#include
bool DoAnother();
using namespace std;
int main()
{
//cout a course header
//declare any varibale you need and create a SimpleCalc object
char ans{'y'};
SimpleCalc calc;
//start a play loop
do {
//ask the user for the operation and the two operands
//use the object to SetOperation
calc.SetOperation(op, num1, num2);
//call GetResults and show them
cout calc.GetResults();
//ask the user if they want to go again
cout "
Do you want to calculate another question? (y/n)";
cin >> ans;
} while (DoAnother());
//cout a goodbye
cout "Thank you using Simple Calculator, Goodbye!" endl;
return 0;
}
bool DoAnother()
{
char ans{'y'};
cout "
Do you want to calculate another? (y/n)";
cin >> ans;
//check
if (ans =='y')
return true;
return false;
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions