42 lines
992 B
C#
42 lines
992 B
C#
namespace ordini_ristorante;
|
|
|
|
class Piatto {
|
|
string nome;
|
|
string descrizione;
|
|
float prezzo;
|
|
|
|
public Piatto(string p_nome, string p_descrizione, float p_prezzo) {
|
|
this.nome = p_nome;
|
|
this.descrizione = p_descrizione;
|
|
this.prezzo = p_prezzo;
|
|
}
|
|
public string GetNome() {
|
|
return this.nome;
|
|
}
|
|
|
|
public string GetDescrizione() {
|
|
return this.descrizione;
|
|
}
|
|
|
|
public float GetPrezzo() {
|
|
return this.prezzo;
|
|
}
|
|
|
|
public void SetNome(string p_nome) {
|
|
this.nome = p_nome;
|
|
}
|
|
|
|
public void SetDescrizione(string p_descrizione) {
|
|
this.descrizione = p_descrizione;
|
|
}
|
|
|
|
public void SetPrezzo(float p_prezzo) {
|
|
this.prezzo = p_prezzo;
|
|
}
|
|
|
|
public void StampaPiatto() {
|
|
Console.WriteLine($"\tNome del piatto: {this.GetNome()}");
|
|
Console.WriteLine($"\tDescrizione: {this.GetDescrizione()}");
|
|
Console.WriteLine($"\tPrezzo: {this.GetPrezzo()}");
|
|
}
|
|
} |