Project 1

Code

/// Name: David Shkolnikov
/// Period: 6
/// Program Name: Project
/// File Name: Project.java
/// Date Finished: 12/4/2015

import java.util.Scanner;
public class Project
{
    public static void main( String[] args )
    {
        String a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
        
        Scanner keyboard = new Scanner(System.in);
        
        System.out.println("Welcome to another adventure!");
        System.out.println(" ");
        System.out.println("You have just fallen asleep. Your dream catalog asks if you would like to go to ");
        System.out.println("\"New York City\",to \"Chicago\" or \"Los Angeles\"?");
        System.out.print("> ");
        a1 = keyboard.next();
        System.out.println(" ");
        
        if (a1.equals("New York City"))
        {
            System.out.println("You get to New York and settle in. You meet someone very attractive");
            System.out.println("and ask if they could show you around this city. They respond with");
            System.out.println("a yes and ask if youd like to go \"eat\" or watch a \"broadway\" play?");
            System.out.print("> ");
            a2 = keyboard.next();
            System.out.println(" ");
            
            if (a2.equals("eat"))
            {
                System.out.println("you and and drink a lot but your new friend is in a hurry.");
                System.out.println("Do you use the \"restroom\" or do you \"hold\" it?");
                System.out.print("> ");
                a3 = keyboard.next();
                System.out.println(" ");
                
                if (a3.equals("restroom"))
                {
                    System.out.println("You use the restroom but fall in to the toilet. ");
                    System.out.println("You are now trapped for all eternity. GOOD GAME. ");
                }
                else if (a3.equals("hold"))
                {
                    System.out.println("You hold it too long and your bladder explodes and you die. ");
                }
            }
            else if (a2.equals("broadway"))
            {
                System.out.println("You watch the show and conclude it is boring. Do you ");
                System.out.println("keep \"watching\" or commit \"suicide\" ");
                System.out.print("> ");
                a4 = keyboard.next();
                System.out.println(" ");
                
                if (a4.equals("watching"))
                {
                    System.out.println("You keep watching but it is so boring your eyes begin to bleed ");
                    System.out.println("and you bleed out. Sorry that had to happen! ");
                    
                }
                else if (a4.equals("suicide"))
                {
                    System.out.println("You take the easy way out and your attractive friend jsut leaves from pure ");
                    System.out.println("horror.");
                }
            }
        }
        else if (a1.equals("Chicago"))
        {
            System.out.println("You get to Chicago and settle in. You meet someone very attractive");
            System.out.println("and ask if they could show you around this city. They respond with");
            System.out.println("a yes and ask if youd like to go to \"Wrigley\" Field or watch a \"Chance\" the rapper concert?");
            System.out.print("> ");
            a5 = keyboard.next();
            System.out.println(" ");
            
            if (a5.equals("Wrigley"))
            {
                System.out.println("You are looking for your seat when all of a sudden you notice a lost puppy!");
                System.out.println("Do you \"take\" it or just \"leave\" the area.");
                System.out.print("> ");
                a6 = keyboard.next();
                System.out.println(" ");
                
                if (a6.equals("take"))
                {
                    System.out.println("You take the puppy and find out that the lost puppy was actually for");
                    System.out.println("a contest and you get to sit inn the dugout with all the Cubs players!");
                    System.out.println("Nice Job i must say.");
                }
                else if (a6.equals("leave"))
                {
                    System.out.println("You leave the puppy and find out it was for a contest. The person that did ");
                    System.out.println("find it got to go sit with the Cubs in their dugout");
                    System.out.println("Way to miss out my friend!");
                 
                }
            }
            else if (a5.equals("Chance"))
            {
                System.out.println("You are watching this lyrical genius and you cant keep still so you ");
                System.out.println("have to decide whether you want to \"sing\" or \"dance\"!");
                System.out.print("> ");
                a7 = keyboard.next();
                System.out.println(" ");
                
                if (a7.equals("sing"))
                {
                    System.out.println("You sing along and Chance notices so he brings you on stage ");
                    System.out.println("and you have a truly amzing time! You did great!");
                }
                else if (a7.equals("dance"))
                {
                    System.out.println("YOu start dancing and you are so bad that everyone makes ");
                    System.out.println("dso much fun of you that you wake up from your dream bursting ");
                    System.out.println("with tears. Maybe you should take classes to dance?");
                }
            }
        }
        else if (a1.equals("Los Angeles"))
        {
            System.out.println("You get to Los Angeles and settle in. You meet someone very attractive");
            System.out.println("and ask if they could show you around this city. They respond with");
            System.out.println("a yes and ask if youd like to go to the \"beach\" or take a \"walk\" in the city?");
            System.out.print("> ");
            a8 = keyboard.next();
            System.out.println(" ");
            
            if (a8.equals("beach"))
            {
                System.out.println("You are on the beach. You get bored and want to play a game. ");
                System.out.println("Do you play \"volleyball\" or \"soccer\".");
                System.out.print("> ");
                a9 = keyboard.next();
                System.out.println(" ");
                
                if (a9.equals("volleyball"))
                {
                    System.out.println("You are playing and having fun when a rabid snitch from");
                    System.out.println("Harry Potter hits you in the head and you die ");
                }
                else if (a9.equals("soccer"))
                {
                    System.out.println("You play soccer and someone comes OUTTA NOWHERE ");
                    System.out.println("and round house kicks you in the face. you die.");
                }
            }
            else if (a8.equals("walk"))
            {
                System.out.println("You are taking your stroll through the  city and a mugger approaches! ");
                System.out.println("DO you \"fight\" or \"run\" ");
              
                System.out.print("> ");
                a10 = keyboard.next();
                System.out.println(" ");
                
                if (a10.equals("fight"))
                {
                    System.out.println("You try to fight but the mugger pulls out a gun and kills you and your");
                    System.out.println("attractive friend. Way to go champ.");
                }
                else if (a10.equals("run"))
                {
                    System.out.println("You and your attractive friend run and get away. You report");
                    System.out.println("to the police and they arrest the mugger. YAYY");
                }
            }
        }
    }
}
    

Picture of the output

Project 1