Commit d577b0a3 authored by Lucas NAURY's avatar Lucas NAURY

Add getters

parent 0e51fd34
Pipeline #2725 failed with stages
......@@ -5,6 +5,7 @@ public class Annonce {
private int id;
private String titre;
private String adresse;
private float prix;
private int image;
// Constructeur
......@@ -12,6 +13,7 @@ public class Annonce {
this.titre = titre;
this.adresse = adresse;
this.image = image;
this.prix = prix;
// Génération d'un id automatique
this.id = Annonce.nbAnnonces;
......@@ -26,5 +28,9 @@ public class Annonce {
this.titre = titre;
}
public float getPrix(){return prix;}
public String getAdresse(){return adresse;}
public int getImage(){return image;}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment