Java is a computer language like C++ or Visual basic
e.g.
import javax.swing.JOptionPane;
public class wexford
{
public static void main(String[]args)
{
String old;
String youth;
String homeless;
String answer1 = "yes";
String answer2 = "no";
String answer3 = "rob her";
String answer4 = "spit";
String answer5 = "rob him";
String answer6 = "yes";
String answer7 = "no";
String answer8 = "Chester";
String town;
int pocket = 0;
JOptionPane.showMessageDialog(null,"Hears the situation: You've hit rock bottom, you've alienated any friends you once had and with an agressive heroin addiction things arent looking up. \n you've decided to catch the next train out of Wexford or Enniscorthy or wherever it is you live and make a clean start. The problem is the train costs €50 and you're skint. \n But your determined to scrape together the cash in any way you can...");
old = JOptionPane.showInputDialog(null,"An old lady asks you to help with her shopping, your response: (yes/no/rob her)");
if ((old).equals(answer1)) {
pocket = pocket + 30;
JOptionPane.showMessageDialog(null,"'What a fine, strong young chap you are, a million thanks'....the lady was so greatful she gave you €30, you have "+pocket+" euro in your pocket");
} if ((old).equals((answer2))) {
pocket = pocket + 0;
JOptionPane.showMessageDialog(null," 'oh you rude little pup, you'll be old and feebled one day too....' you leave with nothing, you have "+pocket+" euro in your pocket");
} if ((old).equals(answer3)) {
pocket = pocket + 40;
JOptionPane.showMessageDialog(null,"There is a look of horror on the old ladies face as you kick her to the ground....you take €40, you have "+pocket+" euro in your pocket");
}
youth = JOptionPane.showInputDialog(null,"Whas da craic? will ye buy us fags? a teenager obviously too young to purchase cigarettes asks for your assistance. your response: yes/no/rob him");
if ((youth).equals(answer6)) {
pocket = pocket + 12;
JOptionPane.showMessageDialog(null,"'Ah sound man', the youth gives you a €12 tip you have "+pocket+" euro in your pocket");
} if ((youth).equals((answer7))) {
pocket = pocket + 0;
JOptionPane.showMessageDialog(null," The youth mutters something obscene as you stride past, you have "+pocket+" euro in your pocket");
} if ((youth).equals(answer5)) {
pocket = pocket + 15;
JOptionPane.showMessageDialog(null,"You walk into the shop, inform the shop keeper about the loitering teen and walk out the fire exit with the teens €7, you have "+pocket+" euro in your pocket");
}
homeless = JOptionPane.showInputDialog(null,"A homeless man tries to persuade you, unconvincingly, that he requires €2 for the bus ride home, your response:(yes/no/spit)");
if ((homeless).equals(answer1)) {
pocket = pocket -2;
JOptionPane.showMessageDialog(null,"'Thank-you kind sir, remeber good things happen to good people' you give €2, you have "+pocket+" euro in your pocket");
} if ((homeless).equals((answer2))) {
pocket = pocket -10;
JOptionPane.showMessageDialog(null," 'You are a cold hearted man', the man beats and takes €10 from you you have "+pocket+" euro in your pocket");
} if ((homeless).equals(answer4)) {
pocket = pocket - 20 ;
JOptionPane.showMessageDialog(null,"'Vulger youth, I will bruise every bone, I will break every tooth, he subsequently does and takes €20 from you You have "+pocket+" euro in your pocket");
}
JOptionPane.showMessageDialog(null, "You spot a gang of youths ahead, and you recognise one of them the chap who asked you to buy him cigarettes earlier...");
if ((youth).equals(answer6)) {
pocket = pocket + 0;
JOptionPane.showMessageDialog(null,"'Ah I know this lad hes sound, whas da craic? you walk away with "+pocket+" euro in your pocket");
} if ((youth).equals((answer7))) {
pocket = pocket - 20;
JOptionPane.showMessageDialog(null,"'Heres dis ****, wouldn't buy me fags...the youths rob €20 on you, you now have "+pocket+" euro in your pocket.");
} if ((youth).equals(answer5)) {
pocket = pocket - 50;
JOptionPane.showMessageDialog(null,"'You're dead ye fuckin' robbin' ****'...*THUD* you feel a searing pain in the back of your head when you eventually come through, you check your pockets...you have "+pocket+" euro in your pocket.");
}
if(pocket >= 50){
town = JOptionPane.showInputDialog(null,"At the end of the day you have enough money to buy a ticket outta Wexford where would you like to travel to now? (tickets are €50) Wexford/Dublin/Tullamore");
}if(pocket < 50){
}town = JOptionPane.showInputDialog(null,"At the end of the day you don't have enough money to buy a ticket outta Wexford, you end up staying there participating in GAA and segregation, in all you end up like everyone else there");
System.exit(0);
}
}
this is a short program written in java allows u to play a little game where the answer u give determines the events that take place