1.) Declare the 3 variables needed for this problem:   b f…

  1.) Declare the 3 variables needed for this problem:   b for the base of a triangle,  h  for the height of a triangle, and a for the area of a triangle. 2.)  Initialize the base of the triangle to 3.0 and the height of the triangle to 4.0 3.) Write the code to use these variables to compute the area of a triangle (area is one-half base times height).4.) Print “The area of a triangle with base of ” + b + ” and height of ” + h + ” is ” + area5.)  Format the area of the triangle to 2 decimal places using System.out.printf   In main: public static void main (String args[]){        //Declare  and initialize the variables here       //Calculate the area of a triangle using the formula provided       //Print the message and format the area to 2 decimal places }