Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Describe the two means of valuing jobs.

Answered: 1 week ago

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

d. How were you expected to contribute to family life?

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago