Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class KontenerImplExt : Kontener
- {
- int Odczyty[];
- int Zapisy[];
- KontenerImpl KONTENER;
- public KontenerImplExt(int rozmiar) throws BladPamieci
- {
- KONTENER=new KontenerImpl(rozmiar);
- Odczyty=new int[rozmiar];
- Zapisy=new int[rozmiar];
- }
- void zwolnij() throws BladPamieci;
- {
- KONTENER.zwolnij();
- }
- void zapisz(int i,int ind) throws BladZapisu
- {
- Zapisy[ind] = Zapisy[ind]+1
- KONTENER.zapisz(i,ind);
- }
- public int ile_odczytow(int ind) throws BladOdczytu;
- {
- return Odczyty[ind];
- }
- public int ile_zapisow(int ind) throws BladOdczytu;
- {
- return Zapisy[ind];
- }
- int odczytaj(int ind) throws BladOdczytu
- {
- try{
- KONTENER.odczytaj(ind);
- }
- catch(TymczasowyBladOdczytu)
- {
- odczytaj(ind);
- }
- catch(PermamentnyBladOdczytu ex)
- {
- throw new ex;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment