using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MNS
{
internal class Boisson
{
int quantite;
string nom;
int sucre;
bool lait;
//constructeur
public Boisson()
{
quantite = 0;
nom = "";
sucre = 0;
lait = false;
}
public Boisson(int initQuantite, string initNom, int initSucre, bool initLait)
{
quantite = initQuantite;
nom = initNom;
sucre = initSucre;
lait = initLait;
}
public void Boire(int quantiteABoire)
{
quantite -= quantiteABoire;
}
public int GetQuantite()
{
return quantite;
}
public void SetQuantite(int newQuantite)
{
quantite = newQuantite;
}
public string GetNom()
{
return nom;
}
public void SetNom(string newNom)
{
nom = newNom;
}
public int GetSucre()
{
return sucre;
}
public void SetSucre(int newSucre)
{
sucre = newSucre;
}
public bool GetLait()
{
return lait;
}
public void SetLait(bool newLait)
{
lait = newLait;
}
}
}
Comments