Question: Jump to level 1 Create a Cat class that inherits from the Animal class. The constructor should take two arguments and initialize the properties type


Jump to level 1 Create a Cat class that inherits from the Animal class. The constructor should take two arguments and initialize the properties type from Animal and weight from Cat. Create a toStringo method that overrides Animal's toString( method and returns the animal's type and weight properties, separated by a comma. Create a Cat class that inherits from the Animal class. The constructor should take two arguments and initialize the properties type from Animal and weight from Cat. Create a toString( method that overrides Animal's tostring 0 method and returns the animai's type and weight properties, separated by a comma. Testing for existence of the Cat class Yours Testing super() with 'type' in constructor Yours Testing for the creation of a Cat object Yours Testing that class Cat inherits from Animal Yours Testing toString 0 with Cat created with argument 'mammal" and " 20kg " Yours and expected differ. See highlights below. Special character iegend Yours Expected Jump to level 1 Create a Cat class that inherits from the Animal class. The constructor should take two arguments and initialize the properties type from Animal and weight from Cat. Create a toStringo method that overrides Animal's toString( method and returns the animal's type and weight properties, separated by a comma. Create a Cat class that inherits from the Animal class. The constructor should take two arguments and initialize the properties type from Animal and weight from Cat. Create a toString( method that overrides Animal's tostring 0 method and returns the animai's type and weight properties, separated by a comma. Testing for existence of the Cat class Yours Testing super() with 'type' in constructor Yours Testing for the creation of a Cat object Yours Testing that class Cat inherits from Animal Yours Testing toString 0 with Cat created with argument 'mammal" and " 20kg " Yours and expected differ. See highlights below. Special character iegend Yours Expected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
