Esempio n. 1
0
        public static object Executa(string tip, string titlu) // TODO DELIA void -> object
        {
            ProcesatorComanda pc = null;                       // TODO DELIA am pus pe null
            Comanda           c  = null;


            if (tip == "cauta")
            {
                pc = new ProcesatorCautaCarte();
                c  = new ComandaCautaCarte();
            }
            else if (tip == "imprumutare")
            {
                c  = new ComandaImprumutaCarte();
                pc = new ProcesatorImprumutareCarte();
            }
            else if (tip == "prelungire")
            {
                c  = new ComandaPrelungireTermen();
                pc = new ProcesatorPrelungireTermen();
            }
            else if (tip == "rezervare")
            {
                c  = new ComandaRezervaCarte();
                pc = new ProcesatorRezervareCarte();
            }
            else if (tip == "restituire")
            {
                c  = new ComandaRestituieCarte();
                pc = new ProcesatorRestituireCarte();
            }


            if (pc != null)             // TODO DELIA return
            {
                c.Titlu = titlu;
                return(pc.Proceseaza(c));
            }
            return(null);
        }
 public override Carte Proceseaza(Comanda comanda)
 {
     return(Proceseaza((T)comanda)); // TODO DELIA return
 }
Esempio n. 3
0
 public abstract Carte Proceseaza(Comanda comanda);