Question: Complete the Dog class in the Dog.java file, according to the following instructions. Define variables: name, breed, age, and weight ( The right data types
Complete the Dog class in the Dog.java file, according to the following instructions.
Define variables: name, breed, age, and weight The right data types should be specified
Make all the variables only accessible through class methods.
Define public methods, getName, setName, getAge, and setAge, to get or set the name and age variables.
Define a public method, bark, to print out "Woof!".
Define a public method, printInfo, to print out all attributes variables
Finally, use the TesterFile.java to test your Dog class.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
