/**
*
* @author USER
*/
public class televisi {
String nama;
String type;
String ukuran;
}
class thosiba extends televisi{
void nama(){
nama="thosiba";
System.out.println("Nama = "+nama);
}
void Type(){
type="LCD";
System.out.println("Type = "+type);
}
void ukuran(){
ukuran="21'";
System.out.println("Ukuran = "+ukuran);
}
}
class polytron extends 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 panasonic extends 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) {
thosiba x=new thosiba();
x.nama();
x.Type();
x.ukuran();
System.out.println("=====================================");
polytron y=new polytron();
y.nama();
y.type();
y.ukuran();
System.out.println("=====================================");
panasonic z=new panasonic();
z.nama();
z.type();
z.ukuran();
System.out.println("=====================================");
}
}
Posted by 12.32 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar