I am still in the middle of learning this language. According to me, and my experience, I find that this language is powerful and tough/hard. Is C++ object oriented? I mean Java is OO but I believe that c++ has more better OO capabilities like allowing your self how to inherit classes, like in Java you would only do :
class Derived extends Base{
...}
in c++ you have 3 different options :
class Derived :public Base{
...}
and
class Derived :private Base{
...}
and also
class Derived :protected Base{
...}
So this is my point. I know some people criticize this language for not being an OOP. Can someone clear my point if C++ is OO or basically OOP+ because it allows you to do object oriented language AND lets you do not OOP
OOP is a style of programming. A way of thinking, a way of writing your code.
Some languages make it easy to express OOP. Some don't make it easy. No language "is" OOP. That would be like saying the English language is a magazine article language.
C++ has some features that make it easier to express OOP. You can choose to use those features, or not.
Anyone who spends their time dividing programming languages into OOP and not OOP is wasting everyone's time. Ignore them. If C++ is a good match for your needs and constraints, use it. If it isn't, don't use it.
Way back when I learned it, C++ was called a 'hybrid' language because you can write working programs without ever creating an object. This is less true these days as there are so many built in objects that you would WANT to use (vector, string being quite popular in most code), but you can still do it (and a few embedded versions of c++ still lack some of these tools and force you to do it). I would still argue that it remains a hybrid, though that terminology may be different now?
Java is a direct descendant of C++. They took a lot of very low level features out, and have since added a lot of high level tools, but the two languages are still very similar in capability (if not syntax).
Your example is PERFECT. C++ offers more options, but Java is given the credit for being more OOP. This completely describes the mindset that a lot of people have.
I would offer you 2 things to learn from this (or 1 thing split out into 2 maybe!)
1) all heavily used common languages have strong and weak points but all are GOOD.
2) beware of people that insist their pet language is better at everything. I mean, I give java a hard time, but it has become a very good tool. It still has some weird (to an old C++ programmer) limitations, but its a very nice language now. Its better at a number of things than c++ (portability still being a huge one), but OOP design is not seriously one of them anymore just like java's performance problems are no longer a serious issue. Both languages have grown a lot over the past decade, closing or greatly reducing many of the gaps that once existed.