Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class PoliceDatabase {
- String age;
- String name;
- String prescriptions;
- String address;
- String DOB;
- String all;
- String history;
- }
- public class ForTestsOnly {
- public static void main(String[] args) {
- Scanner userinput = new Scanner(System.in);
- PoliceDatabase Drunkdriver = new PoliceDatabase();
- Drunkdriver.age = "Age: 20\n";
- Drunkdriver.name = "Name: Joe Dirt\n";
- Drunkdriver.prescriptions = "Prescriptions: None \n";
- Drunkdriver.address = "Address: 7428 Venido Road \n";
- Drunkdriver.DOB = "Date of Birth: March 14, 1998 \n";
- Drunkdriver.history = "On Record: DUI and Assaulting a Police Officer";
- Drunkdriver.all = Drunkdriver.age + Drunkdriver.name + Drunkdriver.prescriptions + Drunkdriver.address + Drunkdriver.DOB + Drunkdriver.history;
- String nextLine = userinput.nextLine();
- System.out.println("As you're doing a routine circle around a neighbourhood, you see someone swerving.");
- System.out.println("You pull up behind them and do the siren wail thing cops do but dont really have a name for.");
- System.out.println("You walk up to the driver window and you can smell the distinct alcohol smell.");
- System.out.println("As he is about to say 'I can explain' you cut him off and say 'Give me your ID!'");
- System.out.println("He hands you his ID and you say 'Turn off the car and give me the keys.'");
- System.out.println("He does so, and you walk back to your car and open the database.");
- System.out.println("Joe Dirt");
- System.out.println("-----POLICE DATABASE-----");
- System.out.println(" ");
- System.out.println(Drunkdriver.all);
- System.out.println(" ");
- System.out.println("-----POLICE DATABASE-----");
- System.out.println("As you're getting out of your car, you wonder\nif what he did to the last officer could happen to you.");
- System.out.println("You're thinking whether you should let him off the hook or not.");
- System.out.println("-----");
- System.out.println(".offthehook = let him off the hook");
- System.out.println(".arresthim = bring him to jail");
- System.out.println("-----");
- switch (nextLine) {
- case ".offthehook":
- System.out.println("You walk to his car and say 'you're off the hook, kid.'");
- System.out.println("You walk back to your car feeling guilty for letting him off the hook.");
- System.out.println("You continue with your day as normal.");
- break;
- case ".arresthim":
- System.out.println("You walk to his car and say 'sir, get out of the car.'");
- System.out.println("He gets out of the car.");
- System.out.println("While he's opening the door, he tries to charge at you, \nbut you step to the side and trip him.");
- System.out.println("You pin him to the ground and handcuff him.");
- System.out.println("-----10 minutes later-----");
- System.out.println("As you're driving to the station, you wonder why he did that.");
- break;
- }
- userinput.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement