Answered You can buy a ready-made answer or pick a professional tutor to order an original one.
Design a class called SimpleCalculator using psudoecode that contains public
Design a class called SimpleCalculator using psudoecode that contains public methodsnamed add(), subtract(). Each of the methods accepts two numeric argumentsand returns a number that represents the result of the appropriate arithmetic operation.Design a sub-class of SimpleCalculator called Calculator using psudoecode thatcontains public methods named multiply(), and divide() and that defines private fieldscalled num1 and num2. Each of the methods accepts two numeric arguments andreturns 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 theCalculator constructor. The main() method then tries each of the four arithmeticmethods. Assume that an DivideByZero is created and thrown if the user attempts todivide by 0. Display an appropriate message when an exception is caught. If noexception, display the results from each arithmetic method call.
How your answer will be gradedFile turned in is in PDF format 5.00%SimpleCalculator class is correctly declared 5.00%SimpleCalculator class contains correct arthmetic methodsr 10.00%Calculator class contains a two arg constructor 10.00%Calculator class is correctly declared 20.00%Calculator class contains correct arthmetic methods 20.00%Calculator main() method is correct including exception handling 30.00%
- @
- 1 order completed
- ANSWER
-
Tutor has posted answer for $25.00. See answer's preview
****** **** ****** *********** Class ********************** Static ******* *********** ******* ******* ******** ******* *** **** number1+ number2 ****** sumEnd ****** ********* ****** ******* *********** number1 ******* ******** integer subtract subtract= ******** number2 Return subtractEnd method ****** class ********************** ***** Calculator inherits-class ****************** ************ private ****** ****** ******* ******* num1 ******* ******* ********** Static ******* **************** number1 ******* ******** integer ******** ********* ******** ******* ****** *********** method ************** Static ******* ************** number1 integer number2) ******* divide ******* ******** ******* ****** divideEnd method ************ ****************** number1 ******* ******** ***** number1 ***** number2End *********** **************** ****** **** **** ** ** Declaration ********* ******* add ******** subtract **************** Calc= new *************** *** y) *** * ************ ***** *** *** addition is” * *** multiply * **************** ******** *** ****** ** ***************** * ******** subtract * ***************** print *** *** ******** ***** * ******** try ****** = *************** ****** * ***************** *** the result ** ******** ***** * ****** *** *** *************** ******** print ********* ****** by 0” *** catchEnd ******* ***** **********