From cc37d15a2e65051dd7e4f8c1393e87297663c366 Mon Sep 17 00:00:00 2001 From: Tomasz Piechucki Date: Tue, 12 Apr 2011 18:25:08 +0000 Subject: [PATCH] --- Winda/src/winda/logic/Pietro.java | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Winda/src/winda/logic/Pietro.java b/Winda/src/winda/logic/Pietro.java index 7e933bc..78a82b4 100644 --- a/Winda/src/winda/logic/Pietro.java +++ b/Winda/src/winda/logic/Pietro.java @@ -5,30 +5,43 @@ package winda.logic; +import java.util.ArrayList; +import java.util.List; + /** * * @author Tomek */ public class Pietro { - private Pasazer [] pasazerowie; - - public Pietro(){ + private List pasazerowie; + private int IloscWysiadajacych; + private int NumerPietra; + public Pietro(int numerPietra){ + this.NumerPietra = numerPietra; } - public Pasazer [] GetPasazerowie(){ + public int GetIloscWysiadajacych(){ + return this.IloscWysiadajacych; + } + + public void SetIloscWysiadajacych(int iloscWysiadajacych){ + this.IloscWysiadajacych = iloscWysiadajacych; + } + + public List GetPasazerowie(){ return this.pasazerowie; } - public void SetPasazerowie(Pasazer [] pasazerowie) { + public void SetPasazerowie(List pasazerowie) { this.pasazerowie = pasazerowie; } public void AddPasazer(Pasazer pasazer) { - this.pasazerowie[this.pasazerowie.length + 1] = pasazer; + this.pasazerowie.add(pasazer); } public void DeletePasazer(Pasazer pasazer) { - throw new UnsupportedOperationException("Not supported yet."); + this.pasazerowie.remove(pasazer); } }