Answer:
<em>The Triangle.java file is not provided; However, the program is as follows;</em>
<em>Comments are used for explanatory purpose</em>
<em>Also see attachment for Triangle.java program file</em>
<em />
import java.util.*;
public class triangle
{
public static void main(String [] args)
{
Scanner input = new Scanner(System.in);
//Declare variables
double base1, height1, base2, height2;
//Prompt user for inputs
System.out.println("Provide values for the base and height of the two triangles");
System.out.print("Base of Triangle 1: ");
base1 = input.nextDouble();
System.out.print("Height of Triangle 1: ");
height1 = input.nextDouble();
System.out.print("Base of Triangle 2: ");
base2 = input.nextDouble();
System.out.print("Height of Triangle 2: ");
height2 = input.nextDouble();
//Compare and Print Results
if(0.5 *base1 * height1 > 0.5 * base2 * height2)
{
System.out.print("Triangle with larger area: Base: "+base1+" Height: "+height1+" Area: "+(0.5 * base1 * height1));
}
else
{
System.out.print("Triangle with larger area: Base: "+base2+" Height: "+height2+" Area: "+(0.5 * base2 * height2));
}
}
}