****JAVA Only***** Help with testpethierarchy.java

public abstract class Pet
{
private String name;
private String parent;
private String birthday;

public Pet()
{
}
public Pet(String name, String parent, String birthday)
{
this.name = name;
this.parent = parent;
this.birthday = birthday;
}
public final void setName(String name)
{
this.name = name;
}
public final void setParent(String parent)
{
this.parent = parent;
}
public final void setBirthday(String birthday)
{
this.birthday = birthday;
}
public final String getName()
{
return name;
}
public final String getParent()
{
return parent;
}

public final String getBirthday()
{
return birthday;
}
  
public String toString()
{
return (name+”, whose pet parent is “+parent+”, was born on “+birthday);
}
}

public class Mammal extends Pet
{
private String vaccine;
private String species;
public Mammal()
{
}

public Mammal(String name, String parent, String birthday, String species, String vax)
{
super(name, parent, birthday);
this.vaccine = vax;
this.species = species;
}

public final void setSpecies(String species)
{
this.species = species;
}
public final void setVaccine(String vax)
{
this.vaccine = vax;
}
public final String getSpecies()
{
return species;
}

public final String getVaccine()
{
return vaccine;
}

public String toString()
{
return super.toString() + (“. This Mammal is a ” + getSpecies() + “. Its last vacination was on ”
+ getVaccine() + “.”);
}

}

public class Reptile extends Pet
{
private String enviro;
private String species;

public Reptile()
{
}

public Reptile(String name, String parent, String birthday, String species, String enviro)
{
super(name, parent, birthday);
this.enviro = enviro;
this.species = species;
}

public final void setSpecies(String species)
{
this.species = species;
}

public final void setEnviro(String enviro)
{
this.enviro = enviro;
}

public final String getSpecies()
{
return species;
}

public final String getEnviro()
{
return enviro;
}
public String toString()
{
return super.toString() + (“. This Retile is a ” + getSpecies() + “. Its environment is ”
+ getEnviro() + “.”);
}

}
Lab 04 Abstract Superclasses and Class Hierarchy General Information This is an extension of the work done in Lab 03. Instructions Modify class Pet to be abstract. Write a simple test harness (requirements below) that will test the modified Pet hierarchy. Labo4.java source files only Submit your modified Pet.java and your new Provided to You The following resources are provided: These instructions The test cases to use in your test harness Expected output from your test harness Requirements Submit two source files – Pet.java and Lab04.java. Submit only those two files, in a zipped folder. The grading process uses the solution set code for Mammal and Reptile, so you do not need to submit those Pet java The only required change is to make the Pet class an abstract class. Do not make any other changes in Pet or the two subclasses. TestPetHierarchy.java Write a new test harness named Lab04.java to meet the following requirements: DO NOT include a Scanner object. 1 Code all processing in the main method. 2 Declare an array to hold four (4) objects-two (2) Mammal objects and two (2) Reptile objects. 3. Use a SINGLE array. a. b. Name the single array myPets Instantiate the objects using the provided test data (included below). Write a SINGLE enhanced for loop to process the array objects. Expected output is included 4 5 below. Test Data Please use the test data provided: =new Mammal “Bunny” my Pets[e] Agnes “2010/08/23”, “Dog”, “2019/06/15” ) ; myPets [1] =new Mammal( “Lana” “Liz” “2015/03/23”, “Llama”. “2020/03/30” ); my Pets [2] new Reptile ( “Edgar” “Kevin”, “2017/02/26″, Iguana”, “Very warm, Damp, Sandy” ); my Pets[3] new Reptile “Diogenes”, “Trudy”, “1919/11/03” “Galapagos Tortoise”. “Warm, Very large enclossure”); Expected Output Bunny, whose owner is Agnes, was born on 2010/08/23. The Mammal is a(n) Dog Next vaccinations due 2019/06/15 Lana, whose owner is Liz, was born on 2015/03/23. The Mammal is a(n) Llama Next vaccinations due 2020/03/30 Edgar, whose owner is Kevin, was born on 2017/02/26. The Reptile is a(n) Iguana. Its required environment is Very warm, Damp, Sandy. Diogenes, whose owner is Trudy, was born on 1919/11/03. The Reptile is a(n) Galapagos Tortoise. Its required environment is Warm, Very large enclosure. Grading Grading rubric for this lab: Submission Score Correct source files submitted; entire package compiles without error/warning; superclass is tagged abstract, array is correctly declared; enhanced for loop is correct; output is correct 100% The remaining lines are deductions for errors/missed requirements. More than one deduction may be taken. Scanner object declared or instantiated -15% Pet class is not abstract -25% Array is not correctly declared -25% Enhanced for loop is missing or incorrect -15 %

"Get 15% discount on your first 3 orders with us"
Use the following coupon
"FIRST15"

Order Now