Design a class called SimpleCalculator using psudoecode that contains public methods named add(),

subtract(). Each of the methods accepts two numeric arguments and returns a number that represents the
result of the appropriate arithmetic operation.
Design a sub-class of SimpleCalculator called Calculator using psudoecode that contains public methods
named multiply(), and divide() and that defines private fields called num1 and num2. Each of the methods
accepts two numeric arguments and returns a number that represents the result of the appropriate arethmetic
operation. Design a two-arg constructor Calculator() that sets the two values num1 and num2. Design a main()
method that prompts the user for two numbers and reads them in. Then creates an instance of the Calculator
class setting the input values via the Calculator constructor. The main() method then tries each of the four
arithmetic methods. Assume that an DivideByZero is created and thrown if the user attempts to divide by 0.
Display an appropriate message when an exception is caught. If no exception, display the results from each
arithmetic method call.

classSimpleCalculator
//Declarations
private num num1
private num num2
public void add(num1,num2)
num1+num2=sum
output "Result is:", sum
return
public void subtract(num1, num2)
num1-num2=difference
output "Result is:", difference
return
endClass
class Calculator inheritsFrom SimpleCalculator
//Declarations
private num num1
private num num2
public void multiply(num1, num2)
num1*num2=product
output "Result is:", product
return
public void divide(num1, num2)
if num2=0
output "Cannot divide by zero."
else
num1/num2=quotient
output "Result is:, quotient
return
endClass