C++-Logo.wine
C++

concept of reusability, How it is achieved in C++?

software re-usability is primary attribute of software quality. C++ strongly supports the concept of  reusability. C++ features such as classes, virtual function, and templates allow designs to be expressed so that re-use is made easier there are many advantage of reusability. They can be applied to reduce cost, effort and time of software development. It also increases the productivity, portability and reliability of the software product.

For example:-
#include<iostream.h>
#include<conio.h>
Class pixeles
{
public:
int c;
void sum(int x, int y)
{
c=x+y;
cout<<“PIXELES CLASSES FOR BCA & MCA \n RESULT=”<<c;
}
};
Class pixelesindia: public pixeles
{
public:
int p;
void add(int x, int y)
{
p=x+y;
cout<<“\n www.pixelesindia.com \n RESULT=”<<p;
}
};
void main()
{
clrscr();
pixelesindia pc;
pc.sum(4,34);
pc.add(3,3);
getch();
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.