static void Main(string[] args) { Dog puppy = new Dog("Orion", "Shawn", 1, gender.Male); // create object instance puppy.Bark(3); // output: Woof!Woof!Woof! Console.WriteLine(puppy.GetTag()); // output: If lost, call Shawn. His name is Orion and he is 1 year old. Dog myDog = new Dog("Lileu", "Dale", 4, gender.Female); // create object instance myDog.Bark(1); // output: Woof! Console.WriteLine(myDog.GetTag()); // output: If lost, call Dale. Her name is Lileu and she is 4 years old. }
static void Main(string[] args) { Dog myDog = new Dog(); myDog.Name = "Fido"; // To do: uncomment the following lines of code to call the methods myDog.Bark(); myDog.doTrick("Fetch"); Console.ReadLine(); }
static void Main(string[] args) { Dog puppy = new Dog("Orion", "Shawn", 1, Gender.Male); puppy.Bark(3); Console.WriteLine(puppy.GetTag()); Dog myDog = new Dog("Lileu", "Dale", 4, Gender.Female); myDog.Bark(1); Console.WriteLine(myDog.GetTag()); }
static void Main() //create object instance { Dog dog1 = new Dog("Coda", "Justin", 1, Gender.Male); dog1.Bark(5); Console.WriteLine(dog1.GetTag()); Dog dog2 = new Dog("Mavis", "Ariana", 13, Gender.Female); dog2.Bark(2); Console.WriteLine(dog2.GetTag()); }
static void Main(string[] args) { /* Clss Dog*/ Dog puppy = new Dog("Orion", "Shawn", 1, Gender.Male); puppy.Bark(3); /*Output should be Woof! Woof! Woof!*/ Console.WriteLine(puppy.GetTag()); Dog myDog = new Dog("Lileu", "Dale", 4, Gender.Female); myDog.Bark(1); Console.WriteLine(myDog.GetTag()); }
static void Main(string[] args) { //Testing if the program works Dog puppy = new Dog("Max", "Garrett", 6, Gender.Male); // create object instance puppy.Bark(5); // output 5 'Woof!'s Console.WriteLine(puppy.GetTag()); // output: If lost, call Garrett. His name is Max and he is 6 years old. Dog myDog = new Dog("Hallie", "Claudia", 1, Gender.Female); // create object instance myDog.Bark(3); // output 3 'Woof!'s Console.WriteLine(myDog.GetTag()); // output: If lost, call Claudia. Her name is Hallie and she is 1 year old. }
static void Main(string[] args) { /*Create an instance of Dog and all Bark and GetTag method*/ Dog puppy = new Dog("Orian", "Shawn", 1, Gender.MALE); puppy.Bark(3); Console.WriteLine(puppy.GetTag()); /*Create an instance of Dog and all Bark and GetTag method*/ Dog myDog = new Dog("Lileu", "Dale", 4, Gender.FEMALE); myDog.Bark(1); Console.WriteLine(myDog.GetTag()); }
static void Main(string[] args) { Dog x = new Dog("Hashbrown", "Mike", 14, Gender.Male); x.Bark(8); x.GetTag(); Dog y = new Dog("Joey", "Tom", 1, Gender.Male); y.Bark(1); y.GetTag(); Dog z = new Dog("Oreo", "Luke", 6, Gender.Female); z.Bark(4); z.GetTag(); }
static void Main(string[] args) { //this creates the Dog Orian who is owned by Shawn Dog puppy = new Dog("Orian", "Shawn", 1, Gender.MALE); puppy.Bark(3); //Output will be Woof!Woof!Woof! Console.WriteLine(puppy.GetTag()); //This creates the Dog Lileu who is owned by Dale Dog myDog = new Dog("Lileu", "Dale", 4, Gender.FEMALE); myDog.Bark(1); //Output will be Woof! Console.WriteLine(myDog.GetTag()); Console.ReadLine(); }
static void Main(string[] args) { Dog dog = new Dog("Name1", "Owner1", 4, Gender.Male); int numOfBarks; Console.WriteLine("How many barks?"); numOfBarks = int.Parse(Console.ReadLine()); dog.Bark(numOfBarks); Console.WriteLine(dog.GetTag()); Dog puppy = new Dog("Orion", "Shawn", 1, Gender.Male); puppy.Bark(3); Console.WriteLine(puppy.GetTag()); Dog myDog = new Dog("Lileu", "Dale", 4, Gender.Female); myDog.Bark(1); Console.WriteLine(myDog.GetTag()); }