public class StudRecExam
{
public static void main( String[] args ){
CobaOverride JamarisRecord = new CobaOverride();
//Memberi nama siswa
JamarisRecord.setName("jamaris");
//Memberi nilai siswa
JamarisRecord.setNilai(80,90,79);
//Memberi alamat siswa
JamarisRecord.setAddress("Jakarta Timur");
//Menampilkan nama siswa
System.out.println("Nama : "+JamarisRecord.getName() );
//Menanmpilkan alamat siswa
System.out.println("Alamat : "+JamarisRecord.getAddress());
//Menampilkan nilai siswa
System.out.println("Nilai rata-rata = "+JamarisRecord.getAverage());
System.out.println("Count = "+CobaOverride.getStudentCount());
}
}
class CobaOverride extends StudRec {
@Override
public String getName()
{
System.out.println("Mahasiswa Lulusan Terbaik");
System.out.println("Universitas Gunadarma");
return name;}
}