Files
project-unisa-for-shop-mana…/it/unisa/info13d/Articoli/CeneInRistoranti.java
2013-12-17 16:24:51 +01:00

51 lines
1.4 KiB
Java

package it.unisa.info13d.Articoli;
import java.io.Serializable;
import java.util.GregorianCalendar;
/**
* Created with MONSTER.
* User: xgiovio
* Date: 16/12/13
* Time: 18.47
*/
public class CeneInRistoranti implements Utilizzabile, Serializable{
/**
*
* @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 int ceneVendute;
}