2012420081
public class apotik1 {
String nama ;
String jabatan;
String tugas;
void pekerja(){
System.out.println("karyawan aptik");
}
void nama(){
}
void jabatan(){
}
void tugas(){
}
}
class Juned extends apotik1{
@Override
void pekerja(){
System.out.println("karyawan apotik");
}
@Override
void nama (){
System.out.println("nama="+nama);
}
@Override
void jabatan (){
System.out.println("jabatan="+jabatan);
}
@Override
void tugas(){
System.out.println("tugas="+tugas);
}}
class Siti extends apotik1{
@Override
void nama (){
System.out.println("nama="+nama );
}
@Override
void jabatan(){
System.out.println("jabatan="+jabatan);
}
@Override
void tugas (){
System.out.println("Tugas="+tugas);
}
}
class Gentong extends apotik1{
@Override
void nama (){
System.out.println("nama="+nama);
}
@Override
void jabatan (){
System.out.println("jabatan="+jabatan);
}@Override
void tugas(){
System.out.println("tugas="+tugas);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
apotik1 x=new apotik1();
Juned a=new Juned();
a.pekerja();
System.out.println("===========================");
a.nama="juned imeot banget";
a.jabatan="kasir youman banget";
a.tugas="pelayana pasien youman";
a.nama();
a.jabatan();
a.tugas();
System.out.println("============================");
Siti b=new Siti();
b.nama="Siti gede banget";
b.jabatan="keuangan youman";
b.tugas="mengatur keuangan youman";
b.nama();
b.jabatan();
b.tugas();
System.out.println("===============================");
Gentong c=new Gentong();
c.nama="adi gentong";
c.jabatan="delivery drug man";
c.tugas="menghendel pengiriman";
c.nama();
c.jabatan();
c.tugas();
System.out.println("==================================");
}}
Posted by 01.16 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar