Zanim zacznę, tak wiem powinen używać enum. 2, Pewnie problem jest banalny, ale już czas mnie nagli, więc zgłaszam się o Was o pomoc.
O to miejsce zatrzymania kodu:
private static void operateFunc(ArrayList<Buyer> buyerList, ArrayList<Auction> auctionList) throws IOException {
AuctionFunc func = new AuctionFunc(buyerList,auctionList);
boolean corectKey = false;
while (!corectKey){
char inputChar = (char) System.in.read();
menu();
System.out.println("Klawisz przez cb wciśnięty to :" + inputChar);
switch (inputChar){
case 1:{ func.initAuction(); break;}
case 2:{ func.findNotFinalAuction();break;}
case 3:{ func.findFinalAuction(); break;}
case 4:{ func.findSeller();break;}
case 5:{ func.addTrustyPoint(); break;}
case 6:{ func.removeTrustyPoint();break;}
}
Program się zachowuje tak, jakby nie wchodził do switcha.
Cała metoda:
private static void operateFunc(ArrayList<Buyer> buyerList, ArrayList<Auction> auctionList) throws IOException {
AuctionFunc func = new AuctionFunc(buyerList,auctionList);
boolean corectKey = false;
while (!corectKey){
char inputChar = (char) System.in.read();
menu();
System.out.println("Klawisz przez cb wciśnięty to :" + inputChar);
switch (inputChar){
case 1:{ func.initAuction(); break;}
case 2:{ func.findNotFinalAuction();break;}
case 3:{ func.findFinalAuction(); break;}
case 4:{ func.findSeller();break;}
case 5:{ func.addTrustyPoint(); break;}
case 6:{ func.removeTrustyPoint();break;}
}
System.out.println("Czy chcesz zakończyć program");
char endProgram = (char) System.in.read();
if (endProgram == 'T'| endProgram == 't'){
corectKey = true;
}
}
}
Link do klasy auctionFunc. http://pastebin.com/0ihVsrnV
O co może chodzić?