)
class Y: public X { string objDesc; public:
void sort();
Pointers to all objects of class X are kept in two static arrays (originals and copies).. If morę objects of class X have the same integer value of data then only one object should be pointed from array originals and the remaining objects (with this value) should be pointed by elements of array copies.
Class Y inherits from class X and has a method sort(), which should modify the contents of arrays originals and copies (private in class X) in this way that pointers to all elements of class X should be before pointers to all elements of class Y. Provide an implementation of the function sort() including all necessary changes in its declaration. Write implementations of all methods used by sort () (hint: prńrale members of class X have to be modified by methods from class X).