Assignment 6


My Dog Type

  //My Dog type
  var Dog = function Dog(Breed, Name, Age, Weight, Sex){  //The type
    this.Breed = Breed;
    this.Name = Name;
    this.Age = Age;
    this.Weight = Weight;
    this.Sex = Sex;
  }

  Dog.prototype.thisdog = function thisdog(){
    console.log(this.Name + " is a " + this.Sex + " dog" + " who is " + this.Age + " old, weighs " + this.Weight + ", and is a " + this.Breed + "." );
  }

  Dog.prototype.namesex = function namesex(){
    console.log(this.Name + " is a " + this.Sex + ".")
  }

  //Instances of the Dog type

  var dog1 = new Dog("Pitbull", "Spike", "5 years", "82 lbs", "female");
  var dog2 = new Dog("Minpin", "Sparky", "3 years two months", "24 lbs", "male")
  var dog3 = new Dog("Dalmation", "Ben", "8 years three months", "89 lbs", "male")
  var dog4 = new Dog("Golden Retriever", "Buttercup", "6 years ten months", "88 lbs", "female")

  dog1.thisdog();
  dog2.thisdog();
  dog3.thisdog();
  dog4.thisdog();

  dog2.namesex();
  dog4.namesex();


  //Getters and Setters???

  /*  get Breed(){
      return Breed;
    }
    get Name(){
      return Name;
    }
    get Age(){
      return Age;
    }
    get Weight(){
      return Weight;
    }
    get Sex(){
      return Sex;
    }

    set Breed(Dog){
      this.Breed = Breed;
    }
    set Name(Dog){
      this.Name = Name;
    }
    set Age(Dog){
      this.Age = Age;
    }
    set Weight(Dog){
      this.Weight = Weight;
    }
    set Sex(Dog){
      this.Sex = Sex;
    }   */