Write a class Compare3 that provides a static method largest. Method largest should
take three Comparable parameters and return the largest of the three (so its return type will
also be Comparable). Recall that method compareTo is part of the Comparable interface,
so largest can use the compareTo method of its parameters to compare them.
(4) Write a class Comparisons whose main method tests your largest method above.
(a) First prompt the user for and read in three strings, use your largest method to find
the largest of the three strings, and print it out (It's easiest to put the call to largest
directly in the call to println.) Note that since largest is a static method, you will call it
through its class name, e.g.,
compare3.largest(val1, val2, val3) and
(b) Add code to also prompt the user for three integers and try to use your largest
method to find the largest of the three integers. Does this work? If it does, it's thanks to
autoboxing, which is
Java's automatic conversion of ints to Integers.(10 Points)
how do i call this two classes in one program? i am having a had time calling in on program. any help will be great