All 3 of these parts can be done in one program. Add spaces between the sections.
Remember your title comments: name, date and purpose
Set up a double variable for base, height and area.
Write a program that uses the base and height variables to find the area of the triangle.
Output your results – print a nice title, print the values of the variables and a label, print the results of the calculation with a label.
Set up a double variable for side, volume, area, surface area.
Write a program that finds the volume, area, and surface area using the variable side.
Output your results – print a nice title, print the values of the variables and a label, print the results of the calculation with a label.
Set up a double variable for height, width, depth, volume and surface area.
Write a program that finds the volume and surface area using the height, width and depth variables.
Output your results – print a nice title, print the values of the variables and a label, print the results of the calculation with a label.
public class Formatting
{
public static void main (String args[])
{
new Formatting ();
}
public Formatting ()
{
System.out.println (" *******************");
System.out.println (" ** MATH CIRCUS **");
System.out.println (" *******************\n\n");
System.out.println (" TTTTT III TTTTT L EEEEE");
System.out.println (" T I T L E ");
System.out.println (" T I T L EEE ");
System.out.println (" T I T L E ");
System.out.println (" T III T LLLL EEEEE");
System.out.println ("\n\n -+-+-+-+-+-+-+-+-\n\n");
System.out.println ("W E L C O M E \n\n");
System.out.println ("Please choose an item from the following list:\n");
System.out.println (" (1) Save file");
System.out.println (" (2) Close program");
System.out.println (" (3) Enter my name\n");
System.out.println (" Your selection >>");
} }