Question: Create a constructor class Add that has public integer variables num 1 and num 2 . Include a default constructor and a void method Addition
Create a constructor class Add that has public integer variables num and num Include a default
constructor and a void method Addition that accepts the two integer parameters, calculates and outputs
the addition.
In your main class Calculate include a main method that prompts the user to enter integer values and
create a reference called answer for the constructor Add. Output the values entered by the user and the
result of the addition in the command line window.
Example
Input
Outputexample
jGRASP exec: java Calculate
The answer is:
First number
Second number
jGRASP: operation complete.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
