//PROGRAM 8-2 package ContohPkg; public class Segitiga { private double tinggi; private double alas; public Segitiga(double tinggi, double alas) { this.tinggi = tinggi; this.alas = alas; } public double luas() { return ((tinggi * alas)/2); } }