création des méthodes get/set/toString de la classe Instrument

This commit is contained in:
ines.benalia 2024-09-12 09:06:59 +02:00
parent 6fc99cba67
commit aeffca7bcc

View File

@ -23,4 +23,41 @@ public class Instrument {
}
@Override
public String toString() {
return "Instrument{" + "ref=" + ref + ", designation=" + designation + ", qteStock=" + qteStock + ", prix=" + prix + '}';
}
public void setRef(int ref) {
this.ref = ref;
}
public void setDesignation(String designation) {
this.designation = designation;
}
public void setQteStock(int qteStock) {
this.qteStock = qteStock;
}
public void setPrix(float prix) {
this.prix = prix;
}
public int getRef() {
return ref;
}
public String getDesignation() {
return designation;
}
public int getQteStock() {
return qteStock;
}
public float getPrix() {
return prix;
}
}