Пример #1
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);
        }
Пример #2
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);
        }
Пример #3
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);
        }