dg3

dg3



II ...

)

class Y: public X { string objDesc; public:

II ...

void sort();

U ...

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).


Wyszukiwarka

Podobne podstrony:
3 (366) 6 class B { public: virtual void f() {.......}}; class D : public B{ public: void f() {.....
The following apply to all types of network both local area networks and wide area networks, m both
216    JAN KIENIEWICZ, MARCIN KULA World War II, when these countries became an objec
24365 Stanton S L Order of?ttle U S Army, World War II(1) The encyclopedic reference to all the U
Najprostsza aplikacja public class Hello{ public static void main(String[ ]
public class Foiirth { public static void main(String[] args) { Tekst napis = new Tekst(){ void
CHAPTER II 17 86230 the econoay by public spending, whlch has not at the beglnnlng of a period a cor
class ZADANIA{ public static void main(String[] args){ Zadanie z = new Zadanie();
// Program04.java public class Program04 { public static void main(String[]{ // zamiana dwóch zmienn
co to jest zmienna? // Program03.java public class Program03 { public static void main(String[] args
co to jest zmienna? // Program03.java public class Program03 { public static void main(String[] args
Aplikacja graficzna import javax.swing.*; class GUI extends JFrame { public static void main (String
class ZADANIA{ public static void main(String[] args){ Zadanie z = new Zadanie();

więcej podobnych podstron