0

Anyone here to please solve this question i didnt understand

Make an Class Aminal and add an attribute mammal (generic attribute for mammals only). Make a class of Mamal as abstract class and make cat and dog as it child class. Creat an abstract method in it named as type(). This method simply display name of the animal. Make sure that animal class can only take object which are inherited form mammals. Make 2 objects of animal in the main method and pass cat and dog to animals objects, the call the type() method of cat and dog using animal class object.

22nd Jan 2021, 7:27 PM
Sohail Mughal
Sohail Mughal - avatar
1 Respuesta
+ 4
Sohail Mughal , we are not here to solve your exercises, but we can give you some support. before we are going to help you, please present your attempt here. if you haven't done a try by yourself so far, please do so. createcyour code in playground and post the link to it here. please also provide a proper task description with sample of input and output. thanks!
22nd Jan 2021, 9:03 PM
Lothar
Lothar - avatar