Files
project-unisa-for-shop-mana…/it/unisa/info13d/Articoli/CeneInRistoranti.java

50 lines
1.3 KiB
Java

package it.unisa.info13d.Articoli;
import java.util.GregorianCalendar;
/**
* Created with MONSTER.
* User: xgiovio
* Date: 16/12/13
* Time: 18.47
*/
public class CeneInRistoranti implements Utilizzabile{
/**
*
* @param IdCena
* @param nomeRistorante
* @param luogo
* @param descrizione_cena
* @param costoPerPersona
* @param dataScadenzaOffertaCena
* @param 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() {
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;
}