Write a program that that computes the maximum of two


Write a program that that computes the maximum of two numbers. You need to follow the following instructions:

Create a class called "MaxProgram'.

The class MaxProgramhas only one method called "maxValue" . This method takes two integer numbers as parameters. The method returns the maximum of the two numbers, else it returns -1, If both numbers are equal.

To test this class, create another class called "Tester", with a main method.

In the main method, create an object of the "MaxProgram" class.

From the created object, call the "maxValue" method, and give it any two numbers.

Print the returned maximum number.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program that that computes the maximum of two
Reference No:- TGS02393454

Now Priced at $10 (50% Discount)

Recommended (92%)

Rated (4.4/5)