Beispiel #1
0
        public static NoteBook GetNoteBook(string brand)
        {
            NoteBook nb = null;

            switch (brand)
            {
            case "Lenovo": nb = new Lenovo();
                break;

            case "IBM": nb = new IBM();
                break;

            case "Acer": nb = new Acer();
                break;

            case "DELL": nb = new DELL();
                break;
            }
            return(nb);
        }
Beispiel #2
0
        public static Computer Brand(string computer)
        {
            Computer c = null;

            switch (computer)
            {
            case "Lenovo":
                c = new Lenovo();
                break;

            case "Dell":
                c = new Dell();
                break;

            case "Acer":
                c = new Acer();
                break;
            }
            return(c);
        }
Beispiel #3
0
        public static NoteBook GetBook(string brand)
        {
            NoteBook nb = null;

            switch (brand)
            {
            case "HP":
                nb = new HP();
                break;

            case "Lenovo":
                nb = new Lenovo();
                break;

            case "IBM":
                nb = new IBM();
                break;
            }
            return(nb);
        }
Beispiel #4
0
        public static Notebook GetNotebook(string brand)
        {
            Notebook nb = null;

            switch (brand)
            {
            case "Lenovo":
                nb = new Lenovo();
                break;

            case "Acer":
                nb = new Acer();
                break;

            default:
                nb = new IBM();
                break;
            }

            return(nb);
        }