/001-dog-class-Cpannell27

001-dog-class-Cpannell27 created by GitHub Classroom

Primary LanguageJava

Work in Repl.it

  1. 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.

  1. Create one getter method for each class variable.

  2. 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.

  1. 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