Question: Computer Science c++ class Op: This class represents the operands in an expression, and can be any double value . Its string representation should be
Computer Science
c++
class Op: This class represents the operands in an expression,and can be any double value. Its string representation should be a string version of its double value.
Create op.cpp file
don't just change return0.0; to 8
to make pass thetest



![pass thetest m FAILED ] OpTest . OpEvaluateNonZero (1 ms) 1 test](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/670ea04cae1c4_788670ea04c9ab13.jpg)

m FAILED ] OpTest . OpEvaluateNonZero (1 ms) 1 test from OpTest (1 ms total) Global test environment tear-down 1 test from 1 test suite ran. (1 ms total) PASSED 0 tests. L FAILED 1 test, listed below: L FAILED OpTest . OpEvaluateNonZero\f\f1 #ifndef OP HPP 2 #define OP HPP 3 4 #include "base. hpp" 5 6 class Op : public Base { 7 public: 8 Op (double value) : Base() { } 9 virtual double evaluate() { return 0.0; } 10 virtual std: :string stringify() { return ""; } 11 12 13 #endif / / OP HPP#itndef BASE HPP #define BASE HPP #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
