2012420079
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author analitao
*/
public class musik1 {
String nama;
String aliran;
String lagu;
void Nama(){
}
void Aliran(){
}
void Lagu(){
}}
class ungu extends musik1{
@Override
void Nama(){
System.out.println("nama="+nama);
}
@Override
void Aliran(){
System.out.println("aliran="+aliran);
}
@Override
void Lagu(){
System.out.println("lagu="+lagu);
} }
class noah extends musik1{
@Override
void Nama(){
System.out.println("nama="+nama);
}
@Override
void Aliran(){
System.out.println("aliran="+aliran);
}
@Override
void Lagu(){
System.out.println("lagu="+lagu);
}
}
class kangen extends musik1{
@Override
void Nama(){
System.out.println("nama="+nama);
}
@Override
void Aliran(){
System.out.println("aliran="+aliran);
}
@Override
void Lagu(){
System.out.println("lagu="+lagu);
}
public static void main(String[] args) {
musik1 x=new musik1();
ungu p= new ungu();
noah q= new noah();
kangen r= new kangen();
p.nama="ungu band";
p.aliran="pop";
p.lagu="kekasih gelap";
p.Nama(); p.Aliran(); p.Lagu();
System.out.println("===============");
q.nama="noah ariel";
q.aliran="pop ";
q.lagu="separuh aku";
q.Nama(); q.Aliran(); q.Lagu();
System.out.println("===============");
r.nama="kangen band";
r.aliran="melayu";
r.lagu="pujaan hati";
r.Nama(); r.Aliran(); r.Lagu();
System.out.println("===================");
}}
Posted by 01.27 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar