123 lines
3.0 KiB
C#
123 lines
3.0 KiB
C#
namespace Verifica_incontri;
|
|
|
|
class Cliente {
|
|
string nome;
|
|
string cognome;
|
|
string sesso;
|
|
string eta;
|
|
string altezza;
|
|
string professione;
|
|
string[] interessi;
|
|
bool isAvailable = true;
|
|
|
|
public Cliente(string p_nome, string p_cognome, string p_sesso, string p_eta, string p_altezza, string p_professione, string[] p_interessi)
|
|
{
|
|
this.nome = p_nome;
|
|
this.cognome = p_cognome;
|
|
this.sesso = p_sesso;
|
|
this.eta = p_eta;
|
|
this.altezza = p_altezza;
|
|
this.professione = p_professione;
|
|
this.interessi = p_interessi;
|
|
}
|
|
|
|
public string GetNome()
|
|
{
|
|
return this.nome;
|
|
}
|
|
|
|
public string GetCognome()
|
|
{
|
|
return this.cognome;
|
|
}
|
|
public string GetSesso()
|
|
{
|
|
return this.sesso;
|
|
}
|
|
|
|
public string GetEta()
|
|
{
|
|
return this.eta;
|
|
}
|
|
|
|
public string GetAltezza()
|
|
{
|
|
return this.altezza;
|
|
}
|
|
|
|
public string GetProfessione()
|
|
{
|
|
return this.professione;
|
|
}
|
|
|
|
|
|
public string[] GetInteressi()
|
|
{
|
|
return this.interessi;
|
|
}
|
|
|
|
public bool GetIsAvailable()
|
|
{
|
|
return this.isAvailable;
|
|
}
|
|
|
|
public void SetNome(string p_nome)
|
|
{
|
|
this.nome = p_nome;
|
|
}
|
|
|
|
public void SetCognome(string p_cognome)
|
|
{
|
|
this.cognome = p_cognome;
|
|
}
|
|
public void SetSesso(string p_sesso)
|
|
{
|
|
this.sesso = p_sesso;
|
|
}
|
|
|
|
public void SetEta(string p_eta)
|
|
{
|
|
this.eta = p_eta;
|
|
}
|
|
|
|
|
|
public void SetAltezza(string p_altezza)
|
|
{
|
|
this.altezza = p_altezza;
|
|
}
|
|
|
|
public void SetProfessione(string p_professione)
|
|
{
|
|
this.professione = p_professione;
|
|
}
|
|
|
|
public void SetInteressi(string[] p_interessi)
|
|
{
|
|
this.interessi = p_interessi;
|
|
}
|
|
|
|
public void SetIsAvailable(bool p_isAvailable)
|
|
{
|
|
this.isAvailable = p_isAvailable;
|
|
}
|
|
|
|
public void StampaCliente()
|
|
{
|
|
string output;
|
|
Console.WriteLine($"Nome: {this.GetNome()}");
|
|
Console.WriteLine($"Cognome: {this.GetCognome()}");
|
|
Console.WriteLine($"Sesso: {this.GetSesso()}");
|
|
Console.WriteLine($"Età: {this.GetEta()}");
|
|
Console.WriteLine($"Altezza: {this.GetAltezza()}");
|
|
Console.WriteLine($"Professione: {this.GetProfessione()}");
|
|
Console.WriteLine("Interessi: ");
|
|
for (int i = 0; i < this.interessi.Length; i++)
|
|
{
|
|
Console.WriteLine(interessi[i]);
|
|
}
|
|
|
|
output = this.isAvailable ? "Sì" : "No";
|
|
|
|
Console.WriteLine($"Disponibile: {output}");
|
|
}
|
|
} |