/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package algo2;
/**
*
* @author olive
*/
public class tugas5 {
String nama,jenis,fakultas;
}
class oldschool extends tugas5 {
public void Na(){
nama = "mas mo";
System.out.println("Nama :"+""+nama);
}
public void je(){
jenis="oldschool";
System.out.println("jenis :"+jenis);
}
public void fa (){
fakultas="fikom";
System.out.println("fakultas :"+fakultas+"\n");
}
}
class hiphop extends tugas5 {
public void Na (){
nama = "mas faad";
System.out.println("Nama :"+nama);
}
public void je(){
jenis="hiphop";
System.out.println("jenis :"+jenis);
}
public void fa (){
fakultas="hukum";
System.out.println("fakultas :"+fakultas+"\n");
}
}
class shuffle extends tugas5 {
public void Na(){
nama = "mas harry";
System.out.println("Nama :"+nama);
}
public void je(){
jenis="shuffle";
System.out.println("jenis :"+jenis);
}
public void fa (){
fakultas="ekonomi";
System.out.println("fakultas :"+fakultas+"\n");
}
public static void main(String[] args){
tugas5 x = new tugas5();
oldschool a = new oldschool();
hiphop b = new hiphop();
shuffle c = new shuffle();
a.Na();
a.je();
a.fa();
b.Na();
b.je();
b.fa();
c.Na();
c.je();
c.fa();
}
}
Posted by 07.08 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar