Пример #1
0
        static void Main(string[] args)
        {
            Dog Carla = new Dog("Carla", "Montgomery", 4, Gender.Female);

            Carla.Bark(2);
            Console.WriteLine(Carla.GetTag());
        }
Пример #2
0
        static void Main(string[] args)
        {
            Dog puppy = 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.
        }
Пример #3
0
            public static void Main(string[] args)
            {
                Dog puppy = new Dog("Onion", "Bill", 1);

                puppy.Bark(3);
                Console.WriteLine(puppy.GetTag());
            }
Пример #4
0
        public static void Main(string[] args)
        {
            Dog puppy1 = new Dog("Orion", "Shawn", 1, Gender.Male);

            puppy1.Bark(3);
            puppy1.GetTag();

            Dog myDog = new Dog("Lileu", "Dale", 4, Gender.Female);

            myDog.Bark(1);
            myDog.GetTag();
        }
Пример #5
0
        static void Main(string[] args)
        {
            Dog dog = new Dog("geoff", "greg", 2, Gender.Male);

            dog.Bark(3);
            Console.WriteLine(dog.GetTag());

            Dog max = new Dog("max", "kyle", 3, Gender.Female);

            max.Bark(2);
            Console.WriteLine(max.GetTag());
        }
Пример #6
0
        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());
        }
Пример #7
0
        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.
        }
Пример #8
0
        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());
        }
Пример #9
0
        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());
        }
Пример #10
0
        static void Main(string[] args)
        {
            // new Dog object
            Dog puppy = new Dog("Orion", "Shawn", 1, Gender.MALE);

            puppy.Bark(3);
            Console.WriteLine(puppy.GetTag());

            // another Dog object
            Dog myDog = new Dog("Kaluah", "Avery", 0, Gender.FEMALE);

            puppy.Bark(5);
            Console.WriteLine(myDog.GetTag());
        }
Пример #11
0
        static void Main(string[] args)
        {
            Dog puppy = new Dog("Orion", "Shawn", 1, Dog.gender.Male);

            puppy.Bark(3);
            Console.WriteLine(puppy.GetTag());
            Console.WriteLine("\t");

            Dog bigDog = new Dog("Lileu", "Dale", 4, Dog.gender.Female);

            puppy.Bark(1);
            Console.WriteLine(bigDog.GetTag());
            Console.ReadLine();
        }
Пример #12
0
        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.
        }
Пример #13
0
        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());
        }
Пример #14
0
        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();
        }
Пример #15
0
        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();
        }
Пример #16
0
        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());
        }