0% found this document useful (0 votes)
609 views

08 Task Performance

1. The document describes an interactive game that allows the player to choose a name and game mode before presenting a mystery to solve. 2. In the mystery, a computer was found damaged and three friends - Joshua, Carlo, and Tristan - are suspects. 3. The player is prompted to view the alibis of each suspect, make an accusation by number, and receives feedback on whether they correctly identified the guilty party.

Uploaded by

cyrelle josuea
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
609 views

08 Task Performance

1. The document describes an interactive game that allows the player to choose a name and game mode before presenting a mystery to solve. 2. In the mystery, a computer was found damaged and three friends - Joshua, Carlo, and Tristan - are suspects. 3. The player is prompted to view the alibis of each suspect, make an accusation by number, and receives feedback on whether they correctly identified the guilty party.

Uploaded by

cyrelle josuea
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

import java.util.

*;

interface PlayerName {
void askName();
}

interface Mode {
void firstChoice();
void secondChoice();
}

interface Action {
void act();
}

public class Game implements PlayerName, Mode, Action {

public void askName() {


System.out.print("Enter your name: ");
}

public void firstChoice() {


System.out.println("To win the game, you must find out the suspect
among the choices.\n You are give four (4) choices in every game");
}
public void secondChoice() {
System.out.println("\nAlmost three (3) days since JV went to AE
house.\n The day after tomorrow, his PC was found crack the case of CPU in the
table near the bootcamp.\n The witness revealed that the suspect was guilty of
desrtruction the PC Case on that day around evening.");
}

public void act() {


System.out.println("The following guilty are his friends in the
bootcamp.");
System.out.println("[Joshua, Carlo, Tristan]");
System.out.println("Who is the Guilty of Destruction?");
}

public static void main(String[] args) {


Scanner guilt = new Scanner(System.in);
String names;
int g;

Game object = new Game();


object.askName();
names = guilt.nextLine();

System.out.println("Press 1 or 2 to select your game mode.");


System.out.println("1 - Play");
System.out.println("2 - Story");
g = guilt.nextInt();
if(g==1) {
object.firstChoice();
}
if(g==2) {
object.secondChoice();
System.out.println("\n..............\n");
}

System.out.println("Press P to start playing, " + names + ".");


while (true) {
char p = guilt.next().charAt(0);
if(p== 'P') {
object.act();
break;
}
else {
System.out.println("Please enter a valid input.");
}
}

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!");
}
}
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy