Advertisement
fosterbl

Pet.java - Starter code

Feb 7th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. /**
  2. Create a class that keeps track of the attributes above for pet records at the animal clinic. Decide what instance variables are needed and their data types. Make sure you use int, double, and String data types. Make the instance variables private. The attributes are:
  3. name, age, weight, type (dog, cat, lizard, etc.), breed
  4.  
  5. Create 2 constructors, one with no parameters (default constructor) and one with many parameters to initialize all the instance variables.
  6.  
  7. Create Accessor (get) methods for each of the instance variables.
  8.  
  9. Create a toString() method that returns all the information in a pet record.
  10.  
  11. */
  12. public class Pet{
  13.    // complete class definition
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement