Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Calculator -num1: double -num2: double >Calculator(num1: double, num2:double) +setNum1(num1: double) +setNum2(num2: double) +getNum1(): double +getNum2(): double +add(): double +sub(): double /um1-num2 +mul(): double +div(): double/um1um2
Calculator -num1: double -num2: double >Calculator(num1: double, num2:double) +setNum1(num1: double) +setNum2(num2: double) +getNum1(): double +getNum2(): double +add(): double +sub(): double /um1-num2 +mul(): double +div(): double/um1um2 ScientificCalculator >Calculator (num1: double, num2:double)//don't forget to call the super class's constructor from here. Otherwise it willshow error as we don't have a constructor without any parameter +power(): double //returns num1 A num2 +reminder(): int //returns the reminder of num1um2 as integer. So, convert num1 and num2 to int before performing the operation +sinNum1(): double //returns the trigonometric sine of numi. +sqrtNum1(): double //returns the square root of Num1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started