示例#1
0
        public ComputerComponent create(int code)
        {
            ComputerComponent cc = null;

            switch (code)
            {
                case 0:
                    cc = new GameRAM();
                    break;
                case 1:
                    cc = new BusinessRAM();
                    break;
                case 2:
                    cc = new MultimediaRAM();
                    break;
            }

            return cc;
        }
示例#2
0
        public ComputerComponent create(int code)
        {
            ComputerComponent cc = null;

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

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

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

            return(cc);
        }