Question: Make sure you write code for the three separate files: SimpleCalculator.h, SimpleCalculator.cpp, and lab5.cpp Code is in C++ Create a class definition Define member functions

 Make sure you write code for the three separate files: "SimpleCalculator.h",

Make sure you write code for the three separate files: "SimpleCalculator.h", "SimpleCalculator.cpp", and "lab5.cpp"

Code is in C++ Create a class definition Define member functions Write a test driver to demonstrate the capabilities of a class Task Write a SimpleCalculator class that has public methods for adding, subtracting, multiplying and dividing two doubles. A sample call is as follows double answer= sc.add( a, b ); Object sc is of type SimpleCalculator. Member function add returns the result of adding its two arguments. Below is a sample output (with input shown here in red) The value of a is: 10 The value of b is: 20 Adding a and b yields 30 Subtracting b from a yields -10 Multiplying a by b yields 200 Dividing a by b yields 0.5 Separate your class definition from implementation. Your class definition must be stored in a file called "SimpleCalculator.h". Your class implementation must be stored in a file called "SimpleCalculator.cpp". You also need to provide your own test driver "lab5.cpp" to test all capabilities (i.e. adding, subtracting, multiplying and dividing two doubles) of your SimpleCalculator class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!