using System; using System.Collections.Generic; using System.Text; namespace Dog { public class Dog { public string color; public string breed; public float weight; public DateTime birthdate; public string name; public Dog(string c, string b, float w, string n) { color = c; breed = b; weight = w; birthdate = DateTime.Now; name = n; } public void bark() { if (weight < 10) { Console.WriteLine("Yiop"); } else { Console.WriteLine("WOOOF"); } } } class Program { static void Main(string[] args) { Dog d = new Dog("red","Presa", 120.0f, "Fluffy"); Console.WriteLine(d.name); d.bark(); Dog d2 = new Dog("green", "Bulldog", 0.01f, "Todd"); Console.WriteLine(d2.name); d2.bark(); Console.WriteLine("D2 was born " + d2.birthdate); } } }