Exemplo n.º 1
0
        public ComputerComponent create(int code)
        {
            ComputerComponent cc = null;

            switch (code)
            {
                case 0:
                    cc = new GameCPU();
                    break;
                case 1:
                    cc = new BusinessCPU();
                    break;
                case 2:
                    cc = new MultimediaCPU();
                    break;
            }

            return cc;
        }
Exemplo n.º 2
0
        public ComputerComponent create(int code)
        {
            ComputerComponent cc = null;

            switch (code)
            {
            case 0:
                cc = new GameCPU();
                break;

            case 1:
                cc = new BusinessCPU();
                break;

            case 2:
                cc = new MultimediaCPU();
                break;
            }

            return(cc);
        }