类层次结构! [英] Class hierarchy!

查看:66
本文介绍了类层次结构!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

能帮助我制作下列动物的正确物体,

虎,狮子,猫,狼,鬣狗,野狗,不是 - 野狗和宠物狗。


还应该在基类中为所有物种设置任何共同属性,为子类中的某些物种设置常用属性,等等。为每个上述物种制作一个班级。





问候,


Areeba

Hi!
Can you please help me in making correct object hierachy of the following animals,
Tiger, lion, cat, wolf, hyena, wild dog, not-so-wild dog and pet dog.

Also should put any common attributes for all in a base class, common attributes for certain species in sub-classes, and so on. Make one class for each of the aforementioned species.





With Regards,

Areeba

推荐答案


嗨!

能否请你帮我制作以下动物的正确对象层次,

虎,狮子,猫,狼,鬣狗,野狗,不那么野狗和宠物狗。


还应该为基类中的所有属性设置任何公共属性,为子类中的某些物种设置公共属性,等等。为每个上述物种制作一个班级。





问候,


Areeba
Hi!
Can you please help me in making correct object hierachy of the following animals,
Tiger, lion, cat, wolf, hyena, wild dog, not-so-wild dog and pet dog.

Also should put any common attributes for all in a base class, common attributes for certain species in sub-classes, and so on. Make one class for each of the aforementioned species.





With Regards,

Areeba



当然我们可以提供帮助,但根据我们的发布指南,我相信你已经读过了,到目前为止你有什么?

Sure we can help, but as per our Posting Guidelines, which I''m sure you''ve read, what do you have so far?



当然我们可以提供帮助,但根据我们的发布指南,我确定你已经阅读了,做了什么你到目前为止?
Sure we can help, but as per our Posting Guidelines, which I''m sure you''ve read, what do you have so far?



嗨!

到目前为止我有一个以下对象层次结构,


动物类有哺乳动物类


哺乳动物类有猫类和狗类


猫类有狮子,老虎和鬣狗类

狗类有狼和宠物狗类


狼类有野狗而不是那么野狗类..



请帮助我如何进一步了解每个班级和物种的共同属性。


问候,

Areeba

Hi!
I have a following object hierarchy so far,

animal class have mammal class

mammal class have cat class and dog class

cat class have lion, tiger and hyena class

dog class have wolf and pet dog class

wolf class have wild dog and not so wild dog class..


please help me how i can proceed further with the common attributes for each class and species.

With Regards,
Areeba


小修正:鬣狗不是猫;它是一种像狗一样的生物。这会毁掉你的b $ b狗子类,但我相信你能搞清楚。


亲切的问候,


Jos
Small correction: a hyena is not a cat; it''s a dog-like creature. That ruins your
dog sub-class a bit but I''m sure you can figure that out.

kind regards,

Jos


这篇关于类层次结构!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆