witam,
mam taki problem:
mam napisana klase implementujaca stog/sterte, mam do tego tez klase wezeli ktora posiada konstruktor, oto ona:
class Node
{
private int iData; // element danych (klucz)
// -------------------------------------------------------------
public Node(int key) // konstruktor
{ iData = key; }
// -------------------------------------------------------------
public int getKey()
{ return iData; }
// -------------------------------------------------------------
public void setKey(int id)
{ iData = id; }
// -------------------------------------------------------------
}
Tutaj jednak bede mial w wezle wartosc jakiegos int'a, a potrzebuje zeby wezel przechowywal obiekt "zdarzenie" z klasy zdarzenie, oraz jakiegos double przechowujacegp wartosc z klasy zdarzenie. Sterta ma byc sortowana wzgledem tego doubla wlasnie... Prosze o jakas pomoc/sugestie. (Jezeli potrzeba to podam caly kod klasy Sterta)
P.S. PILNE ! ! ! (na jutro :) )