C ++问题的基本概念 [英] Basic concept of c++ question

查看:79
本文介绍了C ++问题的基本概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是c ++编程的新手.是否有人知道下面如何解决此问题的基本概念,我的概念还不清楚.谢谢


****************************************************** ******************************************
创建一个C ++类来描述以下信息(使用CAPITAL文本作为方法或属性),
一头牛吃草,有四个腿.
还为DIARY COWS(提供牛奶)创建另一个C ++类,并从COW继承通用属性和方法.
创建每个类的实例,并说明如何设置属性和使用方法.我们不需要展示
主要功能/头文件等.

****************************************************** **************************************

Hello All,

I am a new in c++ programming.Does anyone know the basic concept of how to do this question below,i do not have clear concept.Thanks


*************************************************************************************
Create a C++ class to describe following information (use CAPITAL text as method or properties),
A cow EAT grasses and it has FOUR LEGS.
Also create another C++ class for DIARY COWS (gives milk) and inherit common properties and methods from COW.
Create instances of each class and show how we can set the properties and use the methods. We don''t need to show
main functions/ header file etc.

************************************************************************************

推荐答案

您确实非常希望自己完成学校的作业,除非您想失去几乎所有机会来获得任何基本概念.您的学校给您一些学习的机会,请善加利用.

—SA
You really, really want to do your school assignments by yourself, unless you want to loose nearly all chances to get even the basic concepts of anything. Your school gives you some opportunities to learn, try to use them well.

—SA


阅读这些文章,应该可以帮助您完成作业:
http://www.cplusplus.com/doc/tutorial/inheritance/ [ http://www.cs.bu.edu/teaching/cpp/inheritance/intro/ [^ ]
http://www.parashift.com/c++-faq-lite/basics-of- Inheritance.html [ ^ ]
http://www.learncpp.com/cpp-tutorial/112-basic-inheritance -in-c/ [ ^ ]
Read these articles, should help you to do your assignment:
http://www.cplusplus.com/doc/tutorial/inheritance/[^]
http://www.cs.bu.edu/teaching/cpp/inheritance/intro/[^]
http://www.parashift.com/c++-faq-lite/basics-of-inheritance.html[^]
http://www.learncpp.com/cpp-tutorial/112-basic-inheritance-in-c/[^]


这只是一种建议:
到2011年,您可以从许多资源中获得一些帮助,但是首先,请尝试自己解决此任务.只有在没有解决方案的情况下,才可以在Internet上搜索(这是因为它比在库中要快得多).
最后的小提示-这种结构与经典的OOP示例非常相似:Vehicle-Car.搜索这种班级模式,您会发现很多样本可供选择或开始.
This is just an attempt of advice:
By 2011, there are many sources you can get some help from, but first, try to solve this task by yourself. Only if stuck with no solution, search on Internet (simply because it is much faster than in the library).
Small hint in the end - this structure is very similar to classical OOP example: Vehicle-Car. Search for this pattern of class, and you will find a lot of samples to choose from, or to start from.


这篇关于C ++问题的基本概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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