Question: Write a PHP calculator class which will accept two values as arguments to the public __construct(intNum1, intNum2) {}. The __construct function should assign the passed
Write a PHP calculator class which will accept two values as arguments to the public __construct(intNum1, intNum2) {}. The __construct function should assign the passed parameters to private properties $_intNum1 and $_intNum2, which should be used in the public add(), subtract(), multiply() and divide() functions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
