| | |
need idea for project using classes and inheritance
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2008
Posts: 15
Reputation:
Solved Threads: 2
Hi,
I am Rammohan from Bangalore and working as a Technical lead in big IT firm .
Solution for your answer is follows:
What do you want to deliver? You have not specified what you need....
Any way based on my understanding you need to know
1) what is class? How we can implement it?
2) What is inheritance and how we can implement it?
If your answer is YES, then read the following my information and it may help you for your studies or your requirmenet may solve by this...
Classes are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represents a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects become functions of the class and are referred to as Methods.
For example consider we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects. In this context each Car Object will have its own, Model, Year of Manufacture, Colour, Top Speed, Engine Power etc., which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, Stop form the Methods of Car Class.
No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created.
Inheritance:
Inheritance is the process of forming a new class from an existing class or base class. The base class is also known as parent class or super class, The new class that is formed is called derived class. Derived class is also known as a child class or sub class. Inheritance helps in reducing the overall code size of the program, which is an important concept in object-oriented programming.
Inheritance is a means of specifying hierarchical relationships between types C++ classes can inherit both data and function members from other (parent) classes. Terminology: "the child (or derived) class inherits (or is derived from) the parent (or base) class"
When would I use inheritance?
As a specification device.
Human beings abstract things on two dimensions: part-of and kind-of. A Ford Taurus is-a-kind-of-a Car, and a Ford Taurus has-a Engine, Tires, etc. The part-of hierarchy has been a part of software since the ADT style became relevant; inheritance adds "the other" major dimension of decomposition.
____________________
Regards,
Rammohan Alampally,
<snip false signature>
I am Rammohan from Bangalore and working as a Technical lead in big IT firm .
Solution for your answer is follows:
What do you want to deliver? You have not specified what you need....
Any way based on my understanding you need to know
1) what is class? How we can implement it?
2) What is inheritance and how we can implement it?
If your answer is YES, then read the following my information and it may help you for your studies or your requirmenet may solve by this...
Classes are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represents a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects become functions of the class and are referred to as Methods.
For example consider we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects. In this context each Car Object will have its own, Model, Year of Manufacture, Colour, Top Speed, Engine Power etc., which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, Stop form the Methods of Car Class.
No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created.
Inheritance:
Inheritance is the process of forming a new class from an existing class or base class. The base class is also known as parent class or super class, The new class that is formed is called derived class. Derived class is also known as a child class or sub class. Inheritance helps in reducing the overall code size of the program, which is an important concept in object-oriented programming.
Inheritance is a means of specifying hierarchical relationships between types C++ classes can inherit both data and function members from other (parent) classes. Terminology: "the child (or derived) class inherits (or is derived from) the parent (or base) class"
When would I use inheritance?
As a specification device.
Human beings abstract things on two dimensions: part-of and kind-of. A Ford Taurus is-a-kind-of-a Car, and a Ford Taurus has-a Engine, Tires, etc. The part-of hierarchy has been a part of software since the ADT style became relevant; inheritance adds "the other" major dimension of decomposition.
____________________
Regards,
Rammohan Alampally,
<snip false signature>
Last edited by Ancient Dragon; Aug 21st, 2008 at 7:31 am. Reason: snip false signature
There are lots of examples. For instance
class Person
class student : public person
class teacher : public person
class university : public student, teacher
class animal
class dog : public animal
class cat : public animal
class Person
class student : public person
class teacher : public person
class university : public student, teacher
class animal
class dog : public animal
class cat : public animal
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- idea for project (Java)
- RPG classes - conditional inheritance? (Game Development)
- Graduation Project idea in CSE (Computer Science)
- some suggestions for classes w/ inheritance (C)
Other Threads in the C++ Forum
- Previous Thread: GetProcAddress returns NULL after event is triggerred
- Next Thread: Vector Output Problem
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






