예제 #1
0
        public override string ToString()
        {
            if (_gpu == null || _cpu == null || _motherboard == null || _sticker == null)
            {
                return("");
            }
            var details =
                $"{_cpu.GetType().Name}: {_cpu.Cores} cores, {_cpu.Price}$\n{_gpu.GetType().Name}: {_gpu.Color} color, {_gpu.Price}$\n{_motherboard.GetType().Name}: {_motherboard.Size} size, {_motherboard.Price}$\n{_sticker.GetType().Name}: {_sticker.Hologram} hologram, {_sticker.Price}$";

            return(details);
        }