Solution Review: Implement a Calculator Class
This review provides a detailed analysis to solve the 'Implement a Calculator Class' challenge.
We'll cover the following...
We'll cover the following...
Solution
Explanation
- We have implemented the
Calculatorclass which has the data membersnum1andnum2. - In the constructor, initialized both variables to num1 and num2
- Implemented
add(),a method which returns the addition of two numbers i.e.