08 Task Performance
08 Task Performance
*;
interface PlayerName {
void askName();
}
interface Mode {
void firstChoice();
void secondChoice();
}
interface Action {
void act();
}
System.out.println("\n.............\n");
System.out.println("Press F to find out the alibi.");
while (true) {
char f = guilt.next().charAt(0);
if(f == 'F') {
System.out.println("1. Joshua: I was in the bathroom around that
time.");
System.out.println("2. Carlo: I was in the bootcamp but i'll play
some videogames and did not step out of room.");
System.out.println("3. Tristan: I went to the grocery store to buy
some snacks and alcohol.");
break;
}
else {
System.out.println("Please enter a valid input.");
}
}
System.out.println("\n..............\n");
System.out.println("Who is the guilty of destruction?");
System.out.println("Press the corresponding number to pick the
guilty.");
int num = guilt.nextInt();
if(num == 2) {
System.out.println("You got the Guilty of Destruction,
Congrats!");
} else {
System.out.println("You picked an innocent bootcamp mate.
Please try again!");
}
}
}