/**
*
* @author USER
*/
abstract class abstrack_televisi {
public String nama;
public String type;
public String ukuran;
abstract void nama();
abstract void type();
abstract void ukuran();
}
class thosiba3 extends abstrack_televisi{
@Override
void nama() {
nama="thosiba";
System.out.println("Nama = "+nama);
}
@Override
void type() {
type="LCD";
System.out.println("Type = "+type);
}
@Override
void ukuran() {
ukuran="21'";
System.out.println("ukuran = "+ukuran);
}
}
class polytron3 extends abstrack_televisi {
void nama(){
nama="polytron";
System.out.println("Nama = "+nama);
}
void type(){
type="LCD";
System.out.println("Type = "+type);
}
void ukuran(){
ukuran="21'";
System.out.println("Ukuran = "+ukuran);
}
}
class panasonic3 extends abstrack_televisi {
void nama(){
nama="panasonic";
System.out.println("Nama = "+nama);
}
void type(){
type="LCD";
System.out.println("Type = "+type);
}
void ukuran(){
ukuran="21'";
System.out.println("Ukuran = "+ukuran);
}
public static void main(String[] args) {
thosiba3 x=new thosiba3();
x.nama();
x.type();
x.ukuran();
System.out.println("=====================================");
polytron3 y=new polytron3();
y.nama();
y.type();
y.ukuran();
System.out.println("=====================================");
panasonic3 z=new panasonic3();
z.nama();
z.type();
z.ukuran();
System.out.println("=====================================");
}
}
Posted by 12.54 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar