Tugas 3
Nama : Suryoseno
haryo w
Nim : 2012420147
public class jam {
private String nama;
private String type;
private String warna;
private String ukuran;
void printjam(){
System.out.println("objek jam"+getNama());
System.out.println("dengan type
"+getType());
System.out.println("dengan warna
"+getWarna());
System.out.println("berdasrkan
ukuran "+getUkuran());
}
void printjam(String nama,String
type,String warna){
};
/**
* @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 ){
jam swiss=new jam();
swiss.setNama("swiss
army");
swiss.setType("elegant");
swiss.setWarna("perak");
swiss.setUkuran("medium");
swiss.printjam();
}
}
Posted by 23.07 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar