This commit is contained in:
Tomasz Piechucki 2011-04-12 18:25:08 +00:00
parent 7d936c5cec
commit cc37d15a2e

View file

@ -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<Pasazer> 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<Pasazer> GetPasazerowie(){
return this.pasazerowie;
}
public void SetPasazerowie(Pasazer [] pasazerowie) {
public void SetPasazerowie(List<Pasazer> 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);
}
}