Question: Write a java code Task 1: Create a class Pet in Pet.java that contains a default constructor, a parameter constructor and getters and setters and
Write a java code
Task 1: Create a class Pet in Pet.java that contains a default constructor, a parameter constructor and getters and setters and a toString method. Class members are pet id, name, age, weight, an arraylist of names of previous owners and a Boolean of adopted or not (initially set as false in constructor).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
