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

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!