abstract class tugas7 {
abstract void nama ();
abstract void jenis ();
abstract void fakultas ();
}
class oldschool extends tugas7{
@Override
void nama (){
System.out.println("nama = mas mo");
}
@Override
void jenis (){
System.out.println("jenis = oldschool");
}
@Override
void fakultas (){
System.out.println("fakultas = fikom");
}
}
class shuffle extends tugas7{
@Override
void nama (){
System.out.println("nama = mas harry");
}
@Override
void jenis () {
System.out.println("jenis = shuffle");
}
@Override
void fakultas () {
System.out.println("fakultas = ekonomi");
}
public static void main(String[] args) {
oldschool a=new oldschool();
shuffle b=new shuffle();
a.nama();
a.fakultas();
a.jenis();
System.out.println("\n");
b.nama();
b.fakultas();
b.jenis();
}
}
Posted by 22.29 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar