Sorry in advance !! I have just finished learning OOP lessons in class, but my teacher he just provided the students a small exercise (class and object). Now, i really want the OOP idea (project) which are related to inheritance, overloading, polymorphism else,or if you have any links that related to what i asked just send them to me please !! Don't mind if i had made mistakes.
BunThai
0
Newbie Poster
Recommended Answers
Jump to PostThere are a gazillion articles on the Net that cover this subject. You need to do some serious reading. The subjects of inheritance (dog inherits from animal, so does human), polymorphism (virtual int number_of_legs() - returns 2 for humans, 4 for dogs or cats but calling on a pointer or …
Jump to Post// Inheritance example. using namespace std; class base { private: int m_foo; public: base(int afoo = 0) : m_foo(afoo) {} virtual ~base() { cout << "~base() called." << endl; } int getFoo() const { return m_foo; } void setFoo(int afoo) { m_foo = afoo; } }; class …
All 5 Replies
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
BunThai
0
Newbie Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.