Tugas 4
Nama : Suryoseno
haryo w
Nim : 2012420147
public class jam5
{
public
String nama;
public String type;
public
String warna;
public
String ukuran;
public void jam5(){
}
public void jam5(String nama,String
type,String warna){
this.nama=nama;
this.type=type;
this.warna=warna;
}
public void jam5(String ukuran){
this.ukuran=ukuran;
}
public void nama (){
System.out.println ("Nama
"+nama);}
public void tipe (){
System.out.println ("Tipe
"+type);}
public void warna (){
System.out.println ("Warna
"+warna);}
public void ukuran (){
System.out.println ("Ukuran
"+ukuran);}
/**
* @return the nama
*/
public String getNama() {
return nama;
}
/**
* @param nama the nama to set
*/
public void setNama(String nama) {
this.nama = nama;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* @return the warna
*/
public String getWarna() {
return warna;
}
/**
* @param warna the warna to set
*/
public void setWarna(String warna) {
this.warna = warna;
}
/**
* @return the ukuran
*/
public String getUkuran() {
return ukuran;
}
/**
* @param ukuran the ukuran to set
*/
public void setUkuran(String ukuran) {
this.ukuran = ukuran;
}
public static void main(String[]
args) {
jam5 x =new jam5();
x.jam5("Swiss",
"Elegan", "Perak");
x.jam5("Medium");
x.nama();
x.tipe();
x.warna();
x.ukuran();
}
}
Posted by 23.09 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar