C++ Support for OOP
C++ supports object-oriented programming in ways that C does not.
- C++ includes C as a subset, so you can do everything in C++
that you can do in C, and more.
- C++ is a safer language than C because it has stronger type
rules, which make it difficult to manipulate variables of a given
type using anything other than operations defined for that type.
- C++ allows function names to be overloaded
(a form of polymorphism),
so two operations on different types can have the same name,
and yet the parameter type ensures there is no ambiguity.
- C++ includes classes, which directly supports OOP in C++.
New classes can be derived from existing classes
(a form of inheritance), creating a hierarchy of related
types that can share code and interface.
For all of these reasons, we will be using C++, a language that was
designed to support object-oriented programming,
for our programming assignments.