import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class test
{
public static void main(String[] args)
{
BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
segitigaOOP segitiga = new segitigaOOP();
try
{
System.out.print("Masukkan Alas Segitiga : ");
String a = dataIn.readLine();
segitiga.setAlas(Integer.parseInt(a));
System.out.print("Masukkan Tinggi Segitiga : ");
String t = dataIn.readLine();
segitiga.setTinggi(Integer.parseInt(t));
System.out.println("\n Alas segitiga = " + segitiga.getAlas());
System.out.println("\n Tinggi segitiga = " + segitiga.getTinggi());
System.out.println("\n Luas segitiga = " + segitiga.hitungLuas());
}
catch(IOException e)
{
System.out.println("Error in getting input !!");
}
}
}
Tidak ada komentar:
Posting Komentar