Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class GSM
- {
- private string phoneModel;
- private string phoneManafacturer;
- private string phoneOwner;
- private decimal? phonePrice;
- public GSM(string phoneModel, string phoneManafacturer, string phoneOwner, decimal? phonePrice)
- {
- this.phoneModel = phoneModel;
- this.phoneManafacturer = phoneManafacturer;
- this.phoneOwner = phoneOwner;
- this.phonePrice = phonePrice;
- }
- public static void GetPhoneInfo()
- {
- Console.Write("Type in phone manafacturer: ");
- string manafacturer = Console.ReadLine();
- Console.Write("Type in phone model: ");
- string Model = Console.ReadLine();
- Console.WriteLine("Type in phone owner: ");
- string owner = Console.ReadLine();
- Console.WriteLine("Type in phone price: ");
- decimal? price = Convert.ToDecimal(Console.ReadLine());
- GSM phone=new GSM(Model,manafacturer,owner,price);
- GSM phone2 = new GSM(Model, manafacturer, owner, price);
- Battery.Main1();
- Display.GetDisplayInfo();
- }
- public override string ToString()
- {
- StringBuilder Info = new StringBuilder();
- Info.Append("Phone manafacturer: " + phoneManafacturer);
- Info.ApInfo.Append();pend(" Phone del: " + phoneModel);
- Info.Append("Phone owner: " + phoneOwner);
- Info.Append("Phone price: " + phonePrice);
- //return base.ToString();
- }
- static void Main()
- {
- GetPhoneInfo();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement