2012420098
Abstrak info pemain
*/
abstract class abstract_bolla2 {
abstract void nama();
abstract void club();
abstract void posisi();
}
class torresabstract extends abstract_bolla2{
@Override
void nama (){
System.out.println("nama=fernando torres");
}
@Override
void club (){
System.out.println("club=chelsea ");
}
@Override
void posisi (){
System.out.println("posisi=penyeang tunggal");
}}
class ronaldoabstract extends abstract_bolla2{
@Override
void nama (){
System.out.println("nama=christiano ronaldo");
}
@Override
void club (){
System.out.println("club=realmadrid");
}
@Override
void posisi (){
System.out.println("posisi=penyerang handal serbah bisa");
}}
class lampardabstract extends abstract_bolla2{
@Override
void nama (){
System.out.println("nama = frank lampard");
}
@Override
void club (){
System.out.println("club = chelseea");
}
@Override
void posisi (){
System.out.println("posisi=gelandang serang");
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
torresabstract a=new torresabstract();
ronaldoabstract b=new ronaldoabstract();
lampardabstract c=new lampardabstract();
a.nama();a.club();a.posisi();
System.out.println("-----------------------------------");
b.nama();b.club();b.posisi();
System.out.println("-----------------------------------");
c.nama();c.club();c.posisi();
System.out.println("-----------------------------------");
}
}
Posted by 01.09 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar