2022-09-22 09:59:36 +02:00

32 lines
516 B
C#

namespace Programmation_objet_TLESIO21.TD3.fleuriste {
public class Fleur {
private String nom;
private double prix;
public Fleur(String n, double p) {
this.nom = n;
this.prix = p;
}
protected Object Clone() {
return new Fleur(this.nom, this.prix);
}
public String GetNom() {
return this.nom;
}
public double GetPrix() {
return prix;
}
public override String ToString() {
return "1 " + this.GetNom() + " a un prix unitaire de " + this.GetPrix() + "euros.";
}
}
}