answersLogoWhite

0


Best Answer

There are two ways to reuse a class in C++. Composition and inheritance. With composition, any class data member can be an instance of an existing class. With inheritance, we can derive a new class from an existing class. Either way, we create a new class of object with all the properties of the existing class which can be extended and/or replaced with properties of our own.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

Class inheritance. Derived classes extend the usability of the existing interfaces of their base classes.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What supports reusability and extensibility of classes in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you ensure c plus plus extensibility?

Extensibility primarily relates to the language itself and is ultimately decided by the C++ standards committee members. Programmers can make proposals to the committee, but they have no influence as such. Extensibility with regards your own programs is entirely down to your design team. The language is immaterial on this regard, it's up to you to decide which standards your programs will adopt, whether extensibility is enabled through COM, NET, scripts or some user-defined/proprietary mechanism. Note that extensibility is not the same as scalability, which is probably what you were really asking.


Does c plus plus supports hierarchical inheritance?

Yes.


Are all C plus plus classes subtypes?

no


Drawbacks of c plus plus?

Not as commonly used. More schools are replacing their c++ classes with java classes.


What is re usability in c plus plus?

Code reusability can be found in every programming language, it is not a feature that is specific to C++. However, object oriented languages such as C++ give us much better opportunities for code reusability through inheritance. That is, a derived class inherits the public and protected members of its base classes, so we can make use of existing code to provide more specialised implementations. We don't have to continually re-invent wheels to implement base class functionality that already exists. Moreover, shared class libraries allow us to re-use code in more than one application.


What are filestream classes in c plus plus?

The file stream classes (ifstream and ofstream) are derivatives of the I/O stream classes (istream and ostream) that are specific to file input and output.


Why c plus plus is not complete object oriented language?

because c++ supports all the basic concepts of oop :1.objects,2.classes,3.data abstraction and encapsulation,4.inheritance,5.polymorphism,6.dynamic binding,5.message passing.


Programming codes under classes in c plus plus?

Are called methods.


In c plus plus what are the three ways that classes can relate to each other?

Class wrappers (embedded objects), inheritance (derived objects) and friend classes.


What are logical classes in c plus plus?

There is no such thing. Logic is bitwise operation, not a data type.


Can you get a D plus in school?

If you completely fail most classes


What are the alteratives to a union IN C plus plus that accomplish the same thing?

There is no alternative. C++ supports unions, so no alternative is needed.