The files at the links below contain source code for three i
The files at the links below contain source code for three interrelated classes, a Dog class, a DogOwner class, and a DogTester class that manipulates objects from the other two classes. DogTester.java DogOwner.java Dog.java \"Hotdog\" is a 15 kg showdog that\'s a poodle. Write a statement that creates an owner for \"HotDog\" named Jill. Reference this person with the DogOwner variable jill in the main method in the DogTester class: public class DogTester { public static void main (String[] arg) { DogOwner jill; Dog d = new Dog(\"Hotdog\", \"poodle\", 15.0, true);
Solution
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
 package chegg;
public class Dog {
   
 private double weight;
 private boolean show;
 private String breed;
 private String name;
   
 public Dog()
 {
 weight = 0.0;
 show = false;
 breed = \"\";
 name = \"\";
 }
   
 public Dog(String name,String breed,double weight,boolean show)
 {
 this.weight = weight;
 this.breed = breed;
 this.show = show;
 this.name = name;
 }
   
 public void setWeight(double weight)
 {
 this.weight = weight;
 }
   
 public void setName(String name)
 {
 this.name = name;
 }
   
 public void setShow(boolean show)
 {
 this.show = show;
 }
   
 public void setBreed(String breed)
 {
 this.breed = breed;
 }
   
   
 }
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
 package chegg;
 public class DogOwner {
 private String name;
 private Dog d;
   
 public DogOwner()
 {
 name = \"\";
 d = new Dog();
 }
   
 public DogOwner(String name,Dog d)
 {
 this.name = name;
 this.d = d;
 }
   
 public Dog getDog()
 {
 return d;
 }
   
 public void setDog(Dog d)
 {
 this.d = d;
 }
   
 public void setName(String name)
 {
 this.name = name;
 }
   
 }
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
 package chegg;
 public class DogTester {
 public static void main (String[] arg)
 {
 DogOwner jill;
 Dog d = new Dog(\"Hotdog\", \"poodle\", 15.0, true);
   
 jill = new DogOwner(\"Jill\", d);
 }
 }


