Thursday, July 9, 2009

I want a simple c++ program on hierarchical inheritance showing public,private,protected inheritances?

Do you mean you want an idea for such a program?





Well if so then...





Create a program involving basic geometrical shapes. And then perform certain computations on the various dimensions of those shapes. Use the a hierarchical structure, so that you have base and derived classes. You can have overridable procedures. Of course you utilitize the various access modifiers.





Types of Rectangle: Squares, parallelograms, rhombuses, etc.





How about diagnol segmenting a rectangle? You get a triangle.





Types of triangles: Right triangle, etc.





Types of calculations: area, volume, perimeter, etc.

I want a simple c++ program on hierarchical inheritance showing public,private,protected inheritances?
simple is good depends on compilers though





i tend to recommend MS Visual C++ and C# just because of the help files and resources included with it





they are free at microsoft.com





other than that netmercs codeweaver is awesome also


No comments:

Post a Comment