public class komputereon {
public String Nama;
public Boolean on = false;
public int volume=10;
public double;
public String ret;
public String os;
public void print_komputer(String Temp){
System.out.println("\nKomputer "+Nama+" Berhasil Di buat");
}
public void print_komputer(double frekuensi){
System.out.println("nama sistem operasi");
}
public void print_komputer(int volume, boolean on){
if (on==true)
ret="Komputer Nyala";
else
ret="Komputer Mati";
if (volume > 0)
ret +=" Dengan Volume "+volume;
System.out.println(ret);
}
public String getNama(){
return Nama;
}
public void setNama(String Temp){
Nama=Temp;
}
public String getfos(){
return os;
}
public void setfos(String os){
this.os=os;
}
public int getvolume(){
return volume;
}
public void setvolume(int volume){
this.volume=volume;
}
public boolean geton(){
return on;
}
public void seton(boolean on){
this.on=on;
}
public static void main(String[] args) {
komputereon i=new komputereon();
i.setNama("Ganang computer");
i.setfos("windows");
i.seton(false);
i.setvolume(0);
i.print_komputer(i.getNama());
i.print_komputer(i.getfos());
i.print_komputer(i.getvolume(), i.geton());
komputereon g=new komputereon();
g.setNama("Edy computer");
g.setfos("windows");
g.seton(true);
g.setvolume(100);
g.print_komputer(g.getNama());
g.print_komputer(g.getfos());
g.print_komputer(g.getvolume(), g.geton());}
}
}
Posted by 04.49 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar