0% found this document useful (0 votes)
15 views2 pages

Dosya CBB

dsys

Uploaded by

visnelimonkek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Dosya CBB

dsys

Uploaded by

visnelimonkek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

public class Koltuk {

public String renk;


public int koltukNo;
public boolean dolu;

private int fiyat;


private String malzeme;

public Koltuk(String renk, int koltukNo, boolean dolu, int fiyat, String
malzeme) {
this.renk = renk;
this.koltukNo = koltukNo;
this.dolu = dolu;
this.fiyat = fiyat;
this.malzeme = malzeme;
}

public Koltuk() {
this.renk = "pembe";
this.koltukNo = 4;
this.dolu = false;
this.fiyat = 0;
this.malzeme = "kumas";
}

public void bilgileriYaz() {


System.out.println("renk: " + renk);
System.out.println("koltuk no: " + koltukNo);
System.out.println("dolu: " + (dolu ? "evet" : "hayir"));
System.out.println("ucret: " + fiyat + " TL");
System.out.println("malz: " + malzeme);
}

public int getFiyat() {


return fiyat;
}

public void setFiyat(int fiyat) {


this.fiyat = fiyat;
}

public String getMalzeme() {


return malzeme;
}

public void setMalzeme(String malzeme) {


this.malzeme = malzeme;
}

public void tumBilg() {


System.out.println("renk: " + renk);
System.out.println("koltuk: " + koltukNo);
System.out.println("dolu: " + (dolu ? "evet" : "hayir"));
System.out.println("ucret: " + fiyat + " TL");
System.out.println("malz: " + malzeme);
}
}

You might also like