Choose Your Own Slightly Longer Adventure!

Code

    /// Name: Rachel Smith
    /// Period: 5
    /// Program Name: Choose Your Own Slightly Longer Adventure!
    /// File Name: Longer.java
    /// Date Finished: 11/19/2015
    
    import java.util.Scanner;
    
    public class Longer {
        
        public static void main( String[] args ) {
            
            Scanner keyboard = new Scanner(System.in);
            
            String q1, q2, q22, q222, q3, q33, q333, q3333, q33333, q333333, q4, q44, q444, q4444, q44444, q444444, q4444444, q44444444, q444444444, q4444444444, q44444444444, q444444444444, name;
            
            System.out.println( "IT'S TIME FOR RACHEL'S ADVENTURE" );
            System.out.println();
            System.out.println( "Your day started off like any other day. You got up, speedily consumed a mug of burnt coffee, and ran out the door, briefcase in hand. You jumped into your car and bagan to drive to work. However, you never made it there. The traffic on the bridge is dense and unmoving. For some reason, police officers are gathered near the toll booth. They walk toward your car and instruct you to drive onto the shoulder. They walk you into the kiosk and begin to talk to question you." );
            System.out.println( "WHAT IS YOUR NAME?" );
            System.out.print( "> " );
            name = keyboard.next();
            System.out.println( "You are strip-searched and then given a new black suit, white shirt, and thin black tie. They hand you your brief-case, and instruct you to get into the police car. They turn on the sirens and drive on the shoulder until they have bypassed the traffic, and then drive to SFO. On the way, your gruff, mustached driver begins to brief you. He wears a pair of shiny black aviators and has a police jacket on over his suit. He is a detective for the SF police. He tells you that you have been randomly selected to play a minor role in a government operation. It was necessary to find a layman so that the enemy will not recognize you. He hands you a packet of instructions, and tells you to play it cool. At the airport, you open up the packet and read the first instruction." );
            System.out.println( "1. IN YOUR BRIEFCASE YOU WILL FIND TICKETS TO THREE COUNTRIES: PICK ONE AND GET ON THE FLIGHT." );
            System.out.println( "Choose (a) Paris, France (b) Montreal, Canada (c) Dakar, Senegal" );
            System.out.print( "> " );
            q1 = keyboard.next();
            
            if ( q1.equals("a") ) {
                System.out.println();
                System.out.println( "You get onto the flight to Paris. You are seated next to a young woman in a beige turtlneck and black slacks. She has blonde hair, blue eyes, and smells like nicotine. You open up your packet and read the next instruction." );
                System.out.println( "2. THE WOMAN NEXT TO YOU IS Agent Duchesne. SHE IS THE FRENCH ENVOY AND YOUR PARTNER ON THIS MISSION. DO NOT TALK TO HER. FIND THE BLUE AND GRAY STRIPED DUFFEL BAG IN THE OVERHEAD COMPARTMENT AND SWITCH IT WITH YOUR BRIEFCASE. PUT THE DUFFEL UNDER THE SEAT IN FRONT OF YOU." );
                System.out.println( "Do you (a) switch the bags right away or (b) attempt to make eye contact with Duchesne so that you know that you're on the same page?" );
                System.out.print( "> " );
                q2 = keyboard.next();
                    
                if ( q2.equals("a") ) {
                    System.out.println();
                    System.out.println( "You switch the bags. A flight attendant looks a little suspicious but ignores it. Duschene slides the bag over to her and begins to dig around in it. You think you hear some sort of ticking. Looking over, you see a newly assembled bomb set to explode in 5 hours, when you will be above the Atlantic Ocean.");
                    System.out.println( "You read the next instruction: 3. SEND A TEXT TO THE NUMBER ENTERED IN YOUR DISPOSABLE PHONE WHEN THIS IS DONE. SAY G IF DUSCHENE HAS THE DUFFEL AND EXPLAIN IF SHE DOES NOT." );
                    System.out.println( "Do you (a) send \"G\" to the number or (b) try to stop yourself from being blown up?" );
                    System.out.print( "> " );
                    q3 = keyboard.next();
                    
                    if ( q3.equals("a") ) {
                        System.out.println();
                        System.out.println( "You are beginning to realize that you are about to die." );
                        System.out.println( "Do you (a) try to spend your last moments in bliss or (b) use your disposable phone to get all of your guilts, secrets, and last wishes off your chest?" );
                        System.out.print( "> " );
                        q4 = keyboard.next();
                        
                        if ( q4.equals("a") ) {
                            System.out.println();
                            System.out.println( "You try to talk to Duschene. You lean over and whisper in her ear:" );
                            System.out.println( "\"Hey, I was thinking since this is our last chance, you wanna join the mile high club?\"" );
                            System.out.println( "You may be about to die, but you got lucky, " + name );
                        }
            
                        if ( q4.equals("b") ) {
                            System.out.println();
                            System.out.println( "A flight attendant comes over to you because you are texting and tells you that you need to put it on airplane mode. You are about to comply when she sees the bomb. Duschene puts up a fight but some concerned citizens lock her in a bathroom and disarm the bomb. You live to see another day." );    
                            System.out.println( "You have some awkward explaining to do to your wife, " + name );
                        }
                    }
            
                    if ( q3.equals("b") ) {
                        System.out.println();
                        System.out.println( "Do you (a) send a text asking what's going on or (b) try to grab the bomb while Duschene isn't looking and disarm it?"); 
                        System.out.print( "> " );
                        q44 = keyboard.next();
                        
                        if ( q44.equals("a") ) {
                            System.out.println();
                            System.out.println( "You recieve a text from the anonymous number. It says RIP, Agent " + name );
                        }
            
                        if ( q44.equals("b") ) {
                            System.out.println();
                            System.out.println( "Duschene is gazing out the window when you try to drag the bag over to you with your foot. She whips around and claps your ears and then chokes you out while muffling your mouth. You are dead, " + name );    
                        }
                    }
                }
            
                if ( q2.equals("b") ) {
                    System.out.println();
                    System.out.println( "Duschene ignores you. In your unease do you (a) try to talk to her or (b) look in the duffel before you give it to a possible stranger?" );    
                    System.out.println( "> " );
                    q33 = keyboard.next();
                    
                    if ( q33.equals("a") ) {
                        System.out.println();
                        System.out.println( "You ask her what her name is. She responds in a french accent in a derogatory tone: \"My name is Mme. Charles.\" She then turns away, making it perfectly clear that she doesn't want to talk to you." );
                        System.out.println( "Do you (a) just assume that Charles is an alias and do your assignment or (b) do nothing since there's clearly been a mistake?" );
                        System.out.print( "> " );
                        q444 = keyboard.next();
                        
                        if ( q444.equals("a") ) {
                            System.out.println();
                            System.out.println( "You get the duffel down but nothing happens. Maybe there really was a mixup. Either way, you're stranded in Paris with a fake id and a duffel bag that you discover is full of cash. Have a nice visit, " + name );
                        }
            
                        if ( q444.equals("b") ) {
                            System.out.println();
                            System.out.println( "The woman next to you becomes increasingly angry as you fail to do anything. When you get up to go to the bathroom you return to dicover that she has retrieved the duffel, which contained a variety of weapons. She is locking herself into the cabin when she spies you and shoots you with a menacing sneer. RIP, " + name );    
                        }
                    }
            
                    if ( q33.equals("b") ) {
                        System.out.println();
                        System.out.println( "You find that the duffel contains a massive amount of heroine. As you are zipping up the bag, Duschene calls out: \"Stop! That man is looking in my bag! Pervert!\" She kicks you in the nuts and snags the bag." );   
                        System.out.println( "Do you (a) keep your head down and apologize or (b) expose her and possibly end up at Guantanamo?" );
                        System.out.print( "> " );
                        q4444 = keyboard.next();
                        
                        if ( q4444.equals("a") ) {
                            System.out.println();
                            System.out.println( "The flight attendant moves you to another seat. You wind up in Paris but nobody contacts you. Uh-oh, " + name + "." );
                        }
            
                        if ( q4444.equals("b") ) {
                            System.out.println();
                            System.out.println( "You yell that the bag is filled with heroine. The flight attendant is shocked and nobody really knows what to do. Duschene denies that the bag is hers and says that it looks like her bag but is not. Nevertheless, she is turned over to the Parisian police. You are shot in the head as you step out of the airport. Bye, " + name + "." );    
                        }
                    }
                }
            }
            
            if ( q1.equals("b") ) {
                System.out.println();
                System.out.println( "You get onto the flight to Montreal. You are seated next to a fat man in a navy pinstriped suit. He wears a large ring with a red stone on his left pinky finger, and Italian leather shoes on his feet. His face is tanned and shaven, and an old white scar crosses from the corner of his eyebrow to his cheekbone. You open up your packet and read the next instruction." );
                System.out.println( "2. THE MAN NEXT TO YOU IS Carlos Cuidado. HE IS A VENEZUELAN MINING TYCOON. GET UP AND GO TO THE BATHROOM. REMOVE THE TISSUE BOX FROM ITS SLOT AND FIND THE PAPER TAPED TO THE BOTTOM OF IT." );
                System.out.println( "Cuidado peers over at you suspiciously. You try to shield your packet from his view but he is even more alarmed by this." );
                System.out.println( "Cuidado asks, \"What is that that you're reading, mi amigo?\" His voice is growly and his breath belabored." );
                System.out.println( "Do you (a) tell his that it's a SkyMall magazine or (b) pretend not to hear him and go to the bathroom?" );
                System.out.print( "> " );
                q22 = keyboard.next();
                
                if ( q22.equals("a") ) {
                    System.out.println();
                    System.out.println( "He laughs and snatches the packet from you. His brow furrows and he realizes that there instructions pertaining to him. He puts the packet in his coat pocket. Do you (a) ask the flight attendant to make him give it back or (b) ask to move seats and try to protect yourself?" );
                    System.out.print( "> " );
                    q333 = keyboard.next();
                    
                    if ( q333.equals("a") ) {
                        System.out.println();
                        System.out.println( "Cuidado denies that the packet is yours and the flight attendant kind of looks at you strangely. She leaves. Do you (a) try to take the packet back by force or (b) go to the bathroom and see if the tissue box provides a hint?" );
                        System.out.print( "> " );
                        q44444 = keyboard.next();
                        
                        if ( q44444.equals("a") ) {
                            System.out.println();
                            System.out.println( "You are no match fror Cuidado. Without even looking, he breaks your outretched wrist. Mission Failure, Agent " + name + "." );
                        }
            
                        if ( q44444.equals("b") ) {
                            System.out.println();
                            System.out.println( "In the bathroom the tissue box is stuck and won't come out. You try in other bathrooms but the flight attendants become suspicious and force you to sit down before you can try the last bathroom. You are put in the window seat and there is no way to get past Cuidado. You are shot in the head as you exit the airport in Montreal." );    
                        }
                    }
            
                    if ( q333.equals("b") ) {
                        System.out.println();
                        System.out.println( "You move seats. do you (a) run and hide for a while or (b) try to contact the US government?" );   
                        System.out.print( "> " );
                        q444444 = keyboard.next();
                        
                        if ( q444444.equals("a") ) {
                            System.out.println();
                            System.out.println( "You hide in a internet cafe at the airport for 17 hours. When you come out you hail a cab and take it into the countryside of Quebec. You leave behind " + name + " and become Wilx Danforth. You die as a rich sheep herder. Congrats." );
                        }
            
                        if ( q444444.equals("b") ) {
                            System.out.println();
                            System.out.println( "The goverment does not know who you are. Cuidado kills you as you exit the airport. Or maybe it was the US. Who knows? You're dead, " + name + "." );    
                        }
                    }
                }
            
                if ( q22.equals("b") ) {
                    System.out.println();
                    System.out.println( "You take the packet to the bathroom and find the tissue box. It says: 3. THIS IS A BOMB. IT IS ACTIVATED BY REMOVING THE TISSUE AND FLIPPING THE TINY SWITCH AT THE BOTTOM. DO THIS ABOUT TEN MINUTES BEFORE THE END OF THE FLIGHT AND PUT IT BACK IN THIS SLOT. DISPOSE OF THE PACKET." );    
                    System.out.println( "Do you (a) follow the instructions or (b) refuse to blow up a plane?" );
                    System.out.print( "> " );
                    q3333 = keyboard.next();
                    
                    if ( q3333.equals("a") ) {
                        System.out.println();
                        System.out.println( "You do as you are told. Cuidado continues to grill you on the packet. Do you (a) tell him you are a big fan and those were instructions on how to find and talk to him or (b) deny, deny, deny?" );
                        System.out.print( "> " );
                        q4444444 = keyboard.next();
                        
                        if ( q4444444.equals("a") ) {
                            System.out.println();
                            System.out.println( "He laughs and continues questioning you. He would probably have killed you after the flight if he hadn't returned to the plane half an hour after landing to retrieve a suitcase filled with cash that was personally handled for him. He was blown up in the process. Good work, Agent " + name + "." );
                        }
            
                        if ( q4444444.equals("b") ) {
                            System.out.println();
                            System.out.println( "You continue to deny him but he tails you off the plane and shoots you with a silenced pistol in a small alleyway as you are runnning away from him." );    
                        }
                    }
            
                    if ( q3333.equals("b") ) {
                        System.out.println();
                        System.out.println( "After trashing the instructions you return to your seat and Cuidado resumes questioning you. Do you (a) tell him the truth or (b) say he must have made a mistake?" );  
                        System.out.print( "> " );
                        q44444444 = keyboard.next();
                        
                        if ( q44444444.equals("a") ) {
                            System.out.println();
                            System.out.println( "Cuidado takes a liking to you and you become a big boss in his crime organization. You wear pinstriped suits every day and own a vast collection of fedoras. Congratulations, Boss " + name + "." );
                        }
            
                        if ( q44444444.equals("b") ) {
                            System.out.println();
                            System.out.println( "Cuidado is very suspicious and has you killed as soon as you have left the airport crowd. Sucks to suck, " + name + "." );    
                        }
                    }
                }
            }
            
            if ( q1.equals("c") ) {
                System.out.println();
                System.out.println( "You get onto the flight to Dakar. You are seated next to a mousy little man in a crumpled tie. He wears thick black-rimmed glasses and has hardly any hair left. He looks at you expectantly. You take out the packet and read your next instruction." );
                System.out.println( "2. THE MAN NEXT TO YOU IS YOUR TECH GUY. HAND HIM YOUR BREIFCASE DISCREETLY AND GO TO THE BATHROOM. TAKE THE PACKET WITH YOU." );
                System.out.println( "Do you (a) do what the packet says or (b) try to talk to the guy and figure out what's going on?" );
                System.out.print( "> " );
                q222 = keyboard.next();
                
                if ( q222.equals("a") ) {
                    System.out.println();
                    System.out.println( "The man quickly opens the breifcase and removes a laptop. He turns it on quietly but hastily and begins plugging in cords that seem to be emerging from his jacket. You leave reluctantly and go to the bathroom. You are waiting in there and scanning for any clues when you suddenly hear a flight attendant on the loudspeaker." );
                    System.out.println( "She apologizes, \"Sorry folks but there've been some technical difficulties. We'll have to ask you all to disembark. You've all been rolled over to tonight's flight, which leaves from gate G13 at 7pm.\" People grumble and begin to stand. You read the next instruction." );
                    System.out.println( "3. CHANGE THE BATHROOM STATUS TO VACANT SO THAT IT APPEARS UNOCCUPIED. IF ANYONE CHECKS THE BATHROOM, TRY TO HIDE BEHIND THE DOOR BUT DRAG THEM IN WITH YOU IF YOU MUST AND KNOCK THEM OUT QUICKLY." );
                    System.out.println( "Just as you were beginning to think nobody would check the stall, a flight attendant begins to approach you. Do you (a) knock her out or (b) pretend that you're peeing?" );
                    System.out.print( "> " );
                    q33333 = keyboard.next();
                    
                    if ( q33333.equals("a") ) {
                        System.out.println();
                        System.out.println( "You knock her out and drag her into the bathroom. There is not much room in the stall now. Do you (a) try to get into the stall on the opposite side of the corridor or (b) put on her clothes and pretend to be a flight attendant?" );
                        System.out.print( "> " );
                        q444444444 = keyboard.next();
                        
                        if ( q444444444.equals("a") ) {
                            System.out.println();
                            System.out.println( "As you are crossing over an unshaven man in a leather jacket flashes a US polic badge at you and hands you a package. He gives you an adress to deliver it to and a time. Congratulations, you are now officially an agent, " + name + "." );
                        }
            
                        if ( q444444444.equals("b") ) {
                            System.out.println();
                            System.out.println( "Dressed in female flight attendant clothes you look very suspicious. The pilot for the next flight finds the body and reports you to the police. You are locked away in African prison for 20 years since you are clearly a pervert." );    
                        }
                    }
            
                    if ( q33333.equals("b") ) {
                        System.out.println();
                        System.out.println( "She is quite ashamed and excuses herself fervently. She does however insist that you leave the plane. Do you (a) sweet talk her into letting you off the hook or (b) run away and try to get away from a potentially wrathful US government, since you screwed up their plan?" ); 
                        System.out.print( "> " );
                        q4444444444 = keyboard.next();
                        
                        if ( q4444444444.equals("a") ) {
                            System.out.println();
                            System.out.println( "You end up taking her to dinner and eventually get married. You settle down in Dakar and forget that weird assignment. Have a nice life, " + name + "." );
                        }
            
                        if ( q4444444444.equals("b") ) {
                            System.out.println();
                            System.out.println( "You don't get far in Senegal before you are robbed of everything you own. You hitchhike to Algeria and become a janitor at an old folks home for French people. At least your not dead, right " + name + "?" );    
                        }
                    }
                }
            
                if ( q222.equals("b") ) {
                    System.out.println();
                    System.out.println( "The guy sticks you with a tiny needle as soon as you try to talk to him. You feel faint and woozy. When you wake up you are in a hospital being treated for snake vemon. Do you (a) let it be and go on with your life or (b) sue the government?" );  
                    System.out.print( "> " );
                    q333333 = keyboard.next();
                    
                    if ( q333333.equals("a") ) {
                        System.out.println();
                        System.out.println( "You heal and are released from the hospital. Do you (a) settle down in Senegal of (b) try going back to the US?" );
                        System.out.print( "> " );
                        q44444444444 = keyboard.next();
                        
                        if ( q44444444444.equals("a") ) {
                            System.out.println();
                            System.out.println( "You become a SCUBA instructor and have a nice life. Congrats, " + name + "." );
                        }
            
                        if ( q44444444444.equals("b") ) {
                            System.out.println();
                            System.out.println( "Bad move. The minute you step onto US soil your life is ended with a headshot. You knew too much, " + name );    
                        }
                    }
            
                    if ( q333333.equals("b") ) {
                        System.out.println();
                        System.out.println( "The government has no knowledge of any operation that you were involved in. Do you (a) find the tech and kill him or (b) join ISIS and blow up some dirty Americans?" );  
                        System.out.print( "> " );
                        q444444444444 = keyboard.next();
                        
                        if ( q444444444444.equals("a") ) {
                            System.out.println();
                            System.out.println( "The tech was hard to find but after years on the lamb you catch up with him on a remote Greek island. He has grown a beard and has a different name. You have mastered multiple martial arts, speak all the languages, and have basically become James Bond. You exact your vengeance by forcing him to wlk the plank of a yacht owned by your friend, who is an Italian count. Congrats." );
                        }
            
                        if ( q444444444444.equals("b") ) {
                            System.out.println();
                            System.out.println( "ISIS blows you up because you are A dirty American. That wasn't a good move, " + name );    
                        }
                    }
                }
            }
            
        }
    }

    

Picture of the output

Assignment 1