actually, I was reading C++ from some time , but here i want to learn and imprve my OOPS concepts. IF you have some good links or some e-books or some good book name , please help me here. i have learnt from wiki, my one C book in which some 4-5 pages were given on oops. thanks alot in advance.

Encapsulation is the mechanism that binds code and data together and keeps them safe and away from outside inference and misuse. Encapsulation reduces the maintenance burden, and limiting your exposure to vulnerabilities. The programmer has to design a well-defined interface to control the access of a particular code and data. A class defines the data and code which is shared by a set of objects. A class is a logical construct and an object is a physical construct which exists in reality that is like a chair or a table. A class comprises of code and data which are collectively called members of the class.

Inheritance technique used in OOP that one object acquires the properties of another object without redefining in order to create well defined classes. This technique also supports the hierarchical classification in which each object would not need to be redefined by all its characteristics explicitly. It prevents the programmer from unnecessary work. Inheritance gives us the facility to an object to inherit only those qualities that make it unique within its class.The concept of parent and child class was developed to manage generalization and specialization in OOP and it is represented by a is-a relationship. But now-a-days, the following terms in object oriented programming is commonly used names given to parent and child class.
Super Class: Parent Class
Sub Class: Child Class
Base Class: Parent Class
Derived Class: Child Class
The concept of inheritance makes code readable and avoids repetition. Suppose we have different shapes and they have same or different colors. With the concept of inheritance included later on to design a shape class that has a color attribute and to inherit the color attributes.

C++ also supports multiple inheritances.It occurs when a class is derived from more than one classes. A good example for a better understanding in a real life would be a child with characteristics of his parents.

commented: Thorough and clear explanation. +5
commented: short , but very clear in itself!! +2

I think one of the best books for learning OOPS is Object-Oriented Analysis and Design with Applications by Booch et al. It may take a fair amount of time but investing the time is worth it.

I want practical knowledge. that book has bookish type knowledge. @sourtik

Do you mean this?
Or are you referring to OOP?

Don't give short shrift to "bookish type knowledge". I was giving a paper at the OOPSLA conference in San Jose in 1996 and was in the meeting where Booch, Rumbaugh, and Jacobson announced that they were merging their different, but complimentary, object oriented design methods into a single form, UML, and that they would all be updating Rational Rose to encompass that new modeling paradigm. Booch is a great teacher, and if you really want to get into OOPS, then you need to read such books so you can start to get an intellectual appreciation and understanding of the domain. Students of science first take classes to get the theory, and then they go to the lab...

And, good luck!

commented: yoo!! too motivating.idk how you meet all thee people. you once said about some intel person, he was your freind. :p +2

yes ddanbe.. i am talking about OOP... object orinted programming . like inheritance , polymorphism (in C++ basis).

@rubberman. which book you will recommend now ? as you say, i will have that knowledge first. so ?

Thanks for the comment, nitin1. I've been in this business for 30+ years, published articles, contributed to graduate-level text books on large-scale distributed systems, have a US patent for adaptive system software, and was the principal architect/engineer for the software that runs most 300mm semiconductor, flat-panel displays, and disc drive plants in the world today. FWIW, I am an engineer without degree... yet I am titled Senior Systems Engineer for Nokia. If I didn't have the chops, I wouldn't have the title!

I have been doing OOP since the late 1980's. Hold on a second while I grab a few tomes from my bookshelf...

Ok. Here are 4 that I have got a lot out of:

  1. Design Patterns - Elements of Reusable Object-Oriented Software, by Gamma, Helm, Johnson, and Vlissides.
  2. Analysis Patterns - Reusable Object Models, by Martin Fowler
  3. C++ Programming Language, by Bjarne Stroustrup (the creator of C++)
  4. UML Distilled - Applying the Standard Object Modeling Language, by Martin Fowler (forward by Booch, Jacobson, and Rumbaugh)
commented: huge respect!! +0

respect, respect respect sir!! a bow to you.

actually, i have 6 7 days left for preparaing all these stuff. having book in my hand will take too much time of mine. 3rd book i have seen in my college library 2-3 weeks ago. so what should i do ? you tell me. :( i have to do apti, puzzles, (LL,arrays, trees), OS, DBMS, netwroking, OOPS, some unix commands (to pretend that i know something about unix.) now tell me. :-(

The Stroustrup book will help you learn C++ programming, and it gets into classes, methods, member/static variables and all that. The UML Distilled book is pretty thin, page-wise, but it a great overview of the UML modeling language and OOP in general. It is clearly and well-written with a lot of useful diagrams. It was $29.95USD (full price) when I bought it quite a long time ago. The latest edition is $34.01USD on Amazon. Used versions are available for as little as $2.55USD. Also, there are a LOT of OOPS tools/documents/tutorials and free books on the Internet. Remember, Google is your friend!

@nitin1

If you just want to learn C++ programming or have a quick revision, then I suggest The C++ Programming Language by Bjarne Stroustrup but if you want to learn OOPS and the philosophy behind it, then the book by Booch et al and the books mentioned by rubberman should be read.

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.