- Create the Dog.java class:
Include the following class variables:
- name
- breed
- weight (as a double)
- color
- houseTrained (boolean)
All class variables should be declared lowercase
Write a constructor that takes all of the above as formal parameters.
-
Create one getter method for each class variable.
-
Test your code with the Main.java class:
Create at least three Dog objects using the constructor and print their fields/states with your getter methods.
- Add a toString method that simply returns the name of your dog and a dog emoji 🐶
Need some help? Visit our CSAwesome textbook, codeHS, or Mr. Tidd 👨💻# 001-Dog-Class