示例#1
0
        public string GetDescription()
        {
            var descriptionBuilder = new StringBuilder();

            descriptionBuilder.AppendLine($"ScreenType:{Screen.ToString()}");
            descriptionBuilder.AppendLine($"Battery: {Battery.ToString()}");
            descriptionBuilder.AppendLine($"Keyboard:{Keyboard.ToString()}");
            descriptionBuilder.AppendLine($"SimCard:{ Simcard.ToString()}");
            return(descriptionBuilder.ToString());
        }
示例#2
0
        public string GetDescription()
        {
            var descriptionBuilder = new StringBuilder();

            descriptionBuilder.AppendLine($"Battery: {Battery.ToString()}");
            descriptionBuilder.AppendLine($"Speaker: {Speaker.ToString()}");
            descriptionBuilder.AppendLine($"Keyboard: {Keyboard.ToString()}");
            descriptionBuilder.AppendLine($"Microphone: {Microphone.ToString()}");
            descriptionBuilder.AppendLine($"Screen: {Screen.ToString()}");
            descriptionBuilder.AppendLine($"Simcard: {Simcard.ToString()}");
            return(descriptionBuilder.ToString());
        }
        public override string ToString()
        {
            Headset.Play();

            double time = Charger.CalculateChargingTime(Battery.vBatteryCapacityMAh);

            Output.WriteLine($"Charging time for this battery and charger is {time} hours.");

            string phoneParams;

            phoneParams  = "OTHER PHONE DESCRIPTION:\n";
            phoneParams += $"Screen Type: { Screen.ToString()}\n";
            phoneParams += $"Battery Type: {Battery.ToString()}\n";
            phoneParams += $"Camera Parameters: {Camera.ToString()}\n";
            phoneParams += $"Sim Card: {Simcard.ToString()}\n";
            Output.WriteLine(phoneParams);

            return("");
        }