Question: Create a tester class called DogApplication in same package as you have create the Dog and DogLicense classes. In the DogApplication class , have a
Create a tester class called DogApplication in same package as you have create the Dog and DogLicense classes. In the DogApplication class , have a main method in which you will test the Dog and Dog License objects one by one.
Create another Dog object dog1 using the overloaded constructors. Provide arguments of your choice, but make sure they are in the same order as you have specified in the constructors Using getters, obtain dog1s name, weight and years and print out the details of dog1 on the output.
Create a DogLicense object called dog1License using the default constructor of DogLicense class. Using the getter , obtain dog1s name and pass on this value ( the variable ) to set the name of dog1License object. To do this you will need use the getter to get dog1s name and save the return in a name variable.
Then pass on this name variable to the setter of dog1Lcenses setName setter method. Using the getter , obtain dog1s years. Subtract that value of dog1s years from 2018 and use the result to set the variable called licenseYear.
For example if dogs years is 5, then license year is 2018-5 = 2013. Call the setter, (pass on the value of licenseYear ) for dog1License to set the value of its licenseYear instance variable.
Prompt the user to enter a 4 digit number and store this value in a variable called customID. Call the method called CreateLicenseNum for dog1Liscense and pass on this method, the value of customID. Using getters obtain the values of all instance variables of dog1License and print them on the output with comments.
Answer: copy / paste your code below. Also provide a screen shot of the results. The outputs should be formatted such that each out put line should describe what the output stands for.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
