现在有水果,雪梨,苹果,红苹果、青苹果等几个类,水果有美容等功能,雪梨有除了美容的功能还有止咳的功能,苹果除了美容的功能,还有被当成礼品赠送的功能。红苹果的颜色是红色的,青苹果的颜色是青色的,并且青苹果虽然有苹果的功能,但是青苹果一般不用于当礼品。请根据上面的描述与自然界之间的具体关系,做以下事情。
(1)描述上述类之间的继承关系。
(2)通过Python代码模拟出上面的事物与案例。
(3)通过Python代码判断青苹果的颜色,以及是否有美容的功能、是否有止咳的功能、是否有当礼品的功能。
class Fruit:
def __init__(self):
self.beautiful=True
class Li(Fruit):
def __init__(self):
super().__init__()
self.c=True
class Apple(Fruit):
def __init__(self):
super().__init__()
self.gift=True
class RedApple(Apple):
def __init__(self):
super().__init__()
self.colour='red'
class GreenApple(Apple):
def