Create the logic for a program that performs arithmetic


Create the logic for a program that performs arithmetic functions. Design the program to contain two numeric variables, and prompt the user for values for the variables.

Pass both variables to methods named sum() and difference(). Create the logic for the methods sum() and difference(); they compute the sum of and difference between the values of two arguments, respectively. Each method should perform the appropriate computation and display the results.

The two entered values must passed to a method named getChoice().

The getChoice() method asks the user whether addition or subtraction should be performed and then passes the two values to the appropriate method, where the result is displayed.

Solution Preview :

Prepared by a verified Expert
Business Management: Create the logic for a program that performs arithmetic
Reference No:- TGS02745817

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)