Introduction - If you have any usage issues, please Google them yourself
(1) write Master class and add different methods to treat different pets depending on the type of pet input. Write test class validation;
(2) use polymorphism to modify the code to add the method for each pet class. In the host class, a pet method can be retained, and the parameter type is pet type. Write the test class verification output effect as shown. (note: the same reference type, using different instances to perform different operations is polymorphism; Method rewriting is the foundation of polymorphism.