Question: import java.util.Scanner; public class TriangleArea { public static void main(String args) { findArea(); // this method gets numbers from the user and outputs the area

import java.util.Scanner; public class TriangleArea { public static void main(String args) { findArea(); // this method gets numbers from the user and outputs the area of the triangle } // this method gets numbers from the user, calculates the area of the triangle, and outputs it public static void findArea() { // Instantiate a Scanner to take input from the user Scanner scanner = new Scanner(System.in); // Prompt the user for height and store the input in the variable 'height' System.out.println("Enter the height:"); int height = scanner.nextInt(); // Prompt the user for the base and store the input in the variable 'base' System.out.println("Enter the base:"); int base = scanner.nextInt(); II/III INSERT YOUR CODE HERE TO CREATE THE OUTPUT YOU SEE IN THE SAMPLE BELOW !!!!! scanner.close(); } } The filename for this program is TriangleArea.java Complete the findArea() method to compute and output the area as shown below. Add a comment with your name, date, and program description at the top. To calculate the area of a triangle: Area = 1/2bh Test Cases: Execute your program 5 times entering the following input. Make sure all your output is correct! 1,2 3,3 3,8 5,10 12,17 Hint: you might find that you run into errors if you use division with integers. See if you can figure out a solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
