Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement calculator Object Oriented approach. Complete the code for the class c

ID: 3643213 • Letter: I

Question

Implement calculator Object Oriented approach. Complete the code for the class calculator in a unique header file. Object oriented design and implementation, Menu-driven program schema, input data validation. Only need header file please.

calculator.cpp
#include <iostream>
#include "Calculator.h"
using namespace std;

int main(void){
Calculator c;
char op;

do{
switch( op=c.ShowCalculator()){
case 'a': c.Add(); break;
case 'b': c.Subtract(); break;
case 'c': c.Multiply(); break;
case 'd': c.Divide(); break;
default: c.Setop(-1);
}
}while(op!='q'&& op!='Q');

return 0;
}

Explanation / Answer

#ifndef Calculator_H #define Calculator_H class Calculator { private: double x1; double x2; public: calculator() double c.add(float x1, float x2); double c.substract(float x1, float x2); double c.multiply(float x1, float x2); double c.divide(float x1, float x2); }; double Calculator::getadd() { return x1+x2; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote