Question: [10 marks]: Based on the provided information below, specify the Q3Compute.java class and its methods using standard Java annotation. 1. [2 marks] This is the
![[10 marks]: Based on the provided information below, specify the Q3\Compute.java](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f45207a30ef_81566f452073292e.jpg)
[10 marks]: Based on the provided information below, specify the Q3\Compute.java class and its methods using standard Java annotation. 1. [2 marks] This is the first version of class Compute, written by Faris Taweel and the date of release is 2020-01- 21. Compute program implements an application that simply adds two given integer numbers, calculate the square root of the sum, and prints the output on the screen. 2. [2 marks] The method add is used to add two integers. It takes numA as its first parameter to add method and numB as its second parameter. The method returns an integer value which is the sum of of numA and numB. 3. [4 marks] The squareRoot method takes zero or a positive integer and returns a value of double type. The method throws an InvalidinputException if the constraint on the parameter value is violated. 4. [2 marks] The main method makes use of add method and squareRoot. Its parameter args is used to input two command line arguments. The method returns nothing. But, if command line arguments contain no integers, it throws and IOException. The reader is referred to IOException for more information
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
