Dichiarate variabili delle classi "BeniDiConsumo" "CeneInRistoranti" "Vacanze", implementati i costruttori ed effettuato l'override del metodo eAcquistabile
This commit is contained in:
@@ -13,28 +13,37 @@ public class CeneInRistoranti implements Utilizzabile{
|
||||
/**
|
||||
*
|
||||
* @param IdCena
|
||||
* @param NomeRistorante
|
||||
* @param nomeRistorante
|
||||
* @param luogo
|
||||
* @param descrizione_cena
|
||||
* @param CostoPerPersona
|
||||
* @param DataScadenzaOffertaCena
|
||||
* @param NumCenedaVendere
|
||||
* @param costoPerPersona
|
||||
* @param dataScadenzaOffertaCena
|
||||
* @param numCenedaVendere
|
||||
*/
|
||||
|
||||
public CeneInRistoranti (int IdCena, String NomeRistorante, String luogo, String descrizione_cena, double CostoPerPersona, GregorianCalendar DataScadenzaOffertaCena, int NumCenedaVendere){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public CeneInRistoranti (int IdCena, String nomeRistorante, String luogo, String descrizione_cena, double costoPerPersona, GregorianCalendar dataScadenzaOffertaCena, int NumCenedaVendere){
|
||||
this.IdCena=IdCena;
|
||||
this.nomeRistorante=nomeRistorante;
|
||||
this.luogo=luogo;
|
||||
this.descrizione_cena=descrizione_cena;
|
||||
this.costoPerPersona=costoPerPersona;
|
||||
this.dataScadenzaOffertaCena=dataScadenzaOffertaCena;
|
||||
this.numCenedaVendere=numCenedaVendere;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean eAcquistabile() {
|
||||
// TODO Auto-generated method stub
|
||||
if((dataScadenzaOffertaCena.before(new GregorianCalendar())) && (numCenedaVendere>ceneVendute))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private int IdCena;
|
||||
private String nomeRistorante;
|
||||
private String luogo;
|
||||
private String descrizione_cena;
|
||||
private double costoPerPersona;
|
||||
private GregorianCalendar dataScadenzaOffertaCena;
|
||||
private int numCenedaVendere;
|
||||
private static int ceneVendute;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user