nama : fitri teguh wibowo
nim : 2012420130
public class kipas {
public String berputar=("berputar");
public String tolatole=("tola-tole");
public String mati=("mati");
public String dicolok=("dicolok");
public String dicabut=("dicabut");
public void kipas1(String berputar, String tolatole, String mati){
this.setBerputar(berputar);
this.setTolatole(tolatole);
this.setMati(mati);
}
public void kipas1(String dicolok, String dicabut){
this.setDicolok(dicolok);
this.setDicabut(dicabut);
}
public String getBerputar() {
return berputar;
}
public void setBerputar(String berputar) {
this.berputar = berputar;
}
public String getTolatole() {
return tolatole;
}
public void setTolatole(String tolatole) {
this.tolatole = tolatole;
}
public String getMati() {
return mati;
}
public void setMati(String mati) {
this.mati = mati;
}
public String getDicolok() {
return dicolok;
}
public void setDicolok(String dicolok) {
this.dicolok = dicolok;
}
public String getDicabut() {
return dicabut;
}
public void setDicabut(String dicabut) {
this.dicabut = dicabut;
}
}
public static void main(String[] args) {
// TODO code application logic here
kipas a=new kipas();
System.out.println("kipas sedang "+a.berputar+" dan "+a.tolatole+" karna kabel "+a.dicolok);
System.out.println("kipas sedang "+a.mati+" karna kabel "+a.dicabut);
}
}
Posted by 00.49 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar