assignment 7

      var Animal = function(name){
              this.name = name;
            };

            Animal.prototype.speak = function speak(){
              "use strict";
              console.log("Hi I'm " + this.name  );
            }

            Animal.prototype.move = function move(){
              "use strict"
              console.log(this.name + " is moving");
            }

            Animal.prototype.eat = function eat(){
              "use strict"
              console.log(this.name + " is eating");
            }

            Animal.prototype.sleep = function sleep(){
              "use strict"
              console.log(this.name + " is sleeping");
            }

            function FarmAnimal(name, ftype){
              Animal.call(this, name);
              this.ftype = ftype;
            }

            FarmAnimal.prototype = Object.create(Animal.prototype);
            FarmAnimal.prototype.constructor = FarmAnimal;

            FarmAnimal.prototype.speak = function(){
              console.log("Hi I'm " + this.name + " the " + this.ftype);
            }

            FarmAnimal.prototype.move = function move(){
              console.log(this.name + " the " +  this.ftype + " moving");
            }

            FarmAnimal.prototype.eat = function eat(){
              console.log(this.name + " the " + this.ftype + " is eating");
            }

            FarmAnimal.prototype.sleep = function sleep(){
              console.log(this.name + " the " + this.ftype + " sleeping");
            }

            function PetAnimal(name, ptype){
              Animal.call(this, name);
              this.ptype = ptype;
            }

            PetAnimal.prototype = Object.create(Animal.prototype);
            PetAnimal.prototype.constructor = PetAnimal;

            PetAnimal.prototype.speak = function(){
              console.log("I'm " + this.name + " the " + this.ptype);
            }

            PetAnimal.prototype.move = function move(){
              console.log(this.name + " the " +  this.ptype + " is moving");
            }

            PetAnimal.prototype.eat = function eat(){
              console.log(this.name + " the " + this.ptype + " is eating");
            }

            PetAnimal.prototype.sleep = function sleep(){
              console.log(this.name + " the " + this.ptype + " is sleeping");
            }

            var animal = new Animal("Blitz");
            var animal1 = new Animal("Dodge");
            var animal2 = new Animal("Gilbert");
            var farmA = new FarmAnimal("Baxter", "Goat");
            var farmB = new FarmAnimal("Roger", "Rabbit");
            var farmC = new FarmAnimal("slinky", "Snake");
            var pet = new PetAnimal("Tex", "Dog");
            var pet1 = new PetAnimal("Rex", "Bobcat");
            var pet2 = new PetAnimal("Allen"," Bird" );




            animal.speak();
            animal.move();
            animal.eat();
            animal.sleep();

            animal1.speak();
            animal2.speak();

            farmA.speak();
            farmA.move();
            farmA.eat();
            farmA.sleep();

            farmB.speak();
            farmC.speak();

            pet.speak();
            pet.move();
            pet.eat();
            pet.sleep();

            pet1.speak();
            pet2.speak();