public class tugas6 {
String nama,jenis,fakultas;
public void na(){
nama = "mas mo";
System.out.println("Nama :"+""+nama);
}
public void na(int a){
jenis="oldschool";
System.out.println("jenis :"+jenis);
}
public void na (int a, int b){
fakultas="fikom";
System.out.println("fakultas :"+fakultas+"\n");
}
}
class hiphop extends tugas6 {
public void je (){
nama = "mas faad";
System.out.println("Nama :"+nama);
}
public void je(int a){
jenis="hiphop";
System.out.println("jenis :"+jenis);
}
public void je (int a, int b){
fakultas="hukum";
System.out.println("fakultas :"+fakultas+"\n");
}
}
class shuffle extends tugas6 {
public void fa(){
nama = "mas harry";
System.out.println("Nama :"+nama);
}
public void fa(int a){
jenis="shuffle";
System.out.println("jenis :"+jenis);
}
public void fa (int a, int b){
fakultas="ekonomi";
System.out.println("fakultas :"+fakultas+"\n");
}
public static void main(String[] args){
algo2.tugas6 x = new algo2.tugas6();
algo2.hiphop b = new algo2.hiphop();
algo2.shuffle c = new algo2.shuffle();
x.na();
x.na(1);
x.na(1,2);
b.je();
b.je(1);
b.je(1,2);
c.fa();
c.fa(1);
c.fa(1,2);
}
}
Posted by 07.49 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar