Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
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.

************************************************************************************
Posted
Updated 13-Dec-11 7:13am
v2
Comments
Sergey Alexandrovich Kryukov 13-Dec-11 13:09pm    
Don't you think that "Does anyone know the basic concept of how to do..." sounds pretty rude when asked at CodeProject? Please read some available answers to get the idea...
--SA
idbee2k3 13-Dec-11 22:24pm    
Thanks for calling my attention to that.
Sergey Alexandrovich Kryukov 15-Dec-11 5:46am    
Thank you for understanding.
--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
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900