static void Main(string[] args) { Photo photo = new Photo(8, 10); MattedPhoto mattedphoto = new MattedPhoto(8, 10, "black"); FramedPhoto framedPhoto = new FramedPhoto(8, 10, "wood", "modern"); WriteLine(photo.ToString()); WriteLine(mattedphoto.ToString()); WriteLine(framedPhoto.ToString()); }
static void Main(string[] args) { Photo photo1 = new Photo(); photo1.Width = 8; photo1.Height = 10; Console.WriteLine(photo1.ToString()); MattedPhoto mphoto1 = new MattedPhoto(); mphoto1.Width = 10; mphoto1.Height = 12; mphoto1.Color = "Blue"; Console.WriteLine(mphoto1.ToString()); FramedPhoto fphoto = new FramedPhoto(); fphoto.Width = 3; fphoto.Height = 4; fphoto.Style = "Modern"; fphoto.Material = "Titanium"; Console.WriteLine(fphoto.ToString()); }
private static void DisplayMattedPhoto(MattedPhoto photo) { Console.WriteLine("\tType: {0}, ToString(): {1}, Length: {2}, Width: {3}, Color: {4}, Price: {5}", photo.GetType(), photo.ToString(), photo.Length, photo.Width, photo.Color, photo.Price); }