Question: PLEASE WRITE CODE IN JAVA, THANK YOU. Write the following classes as per the UML design : Dog, DogLicense , Owner and DOB. Then, write
PLEASE WRITE CODE IN JAVA, THANK YOU.

Write the following classes as per the UML design : Dog, DogLicense , Owner and DOB.
Then, write a TestDog class that does the following :
Create a default Dog object dog1.
Obtain and set the values of instance variable name by using the respective setter.
Create the component object of the type Owner. To do this get the values of the owners instance variables from the user. Use the full arg-constructor of Owner to create an object of this class. Use this newly created Owner object as the parameter of the setOwner method of the dog1 object.
Follow the procedure as described in step e) to create the DOB object and use this object as the parameter of the setDob method for dog1 object.
Follow the procedure similar to what is described in step e). Obtain the values of instance variables from the user, for the DogLicense object. Create the DogLicense object and use this object as the parameter of the setDogLicense method for dog1 object.
Call the printDogInfo() method for dog1.
Create a full-arg Dog object dog2. Use the same user values that you obtained in steps d), e) , f) and g). You do not need to obtain these values again from the user.
Call the printDogInfo() method for emp2, to print out all these values.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
