EMERGENCY 911
import java.util.Scanner;
public class Hi{
public static void main(String[]args){
Scanner emergency = new Scanner (System.in);
System.out.println("What is the emergency\nFire\nCrime\nCar crash");
String boss = emergency.nextLine();
if (boss.equals("Fire")){
fire ();
}
else if (boss.equals("Crime")){
crime();
}
else if (boss.equals("Car crash")){
carcrash();
}
}
public static void fire (){
Scanner input = new Scanner (System.in);
System.out.println("How many minutes has the fire been going");
int first = input.nextInt();
if ( first >=4){
System.out.println("1) Get as far away from it as quicky as possable. \n2) Quicky contact the Fire Department.");
Scanner b = new Scanner (System.in);
System.out.println("\nDoes anyone live in the house/apartment with you?");
String a = b.nextLine();
if (a.equals ("yes")){
System.out.println("\nPlease Priotize women and children");
}
else if (a.equals("no")){
System.out.println("\nIf your by yourself Proceed to do normal safty protocol Stop drop and roll.");
}
}
else if (first <= 0){
System.out.println("Invalid Input");
}
else {
System.out.println("It is most likly a small kitchen fire and can be put out quickly.");
System.out.println("what's your Emergency");
}
}
public static void crime() {
Scanner input = new Scanner (System.in);
System.out.println("Under what category is accident:\n"
+ "\nPlease type the corresponding accident of the victim from the following category"
+ "\n1.Stabbing\n2.Shooting\n3.Blunt force");
String accident = input.nextLine();
if(accident.equals ("Stabbing")){
System.out.println("\nFollow the instructions\n1.Make sure the scene is safe\n"
+ "2.Check to see if the victim is still breathing\n"
+ "3.Check to see if the weapon used is still in the victims body"
+ "If it is, leave it as it is"
+ "\n4.Look for a clean or semi clean rag or shit"
+ "\n5.Put pressure on the wound using the cloth however is "
+ "the weapon is still in the body put pressure around the wound\n");
}
else if(accident.equals ("Shooting")){
System.out.println("\nFollow the following instructions\n1.Make sure the scene is safe"
+ "\n2.Call the police"
+ "\n3.Check to see if the victim is still breathing"
+ "\n4.Look for a piece of cloth, preferably a clean one"
+ "\n5.Put pressure on the wound until paramedics arrive\n");
}
else if(accident.equals("Blunt Force")){
System.out.println("\nFollow the following instructions\n1.Make sure the scene is safe"
+ "\n2.Check to see if the victim is bleeding, if he is put pressure on the would using a rag"
+ "\n3.Lay the victim down on the floor and keep the victim from doing any movements until the ambulance arrives\n");
}else {
System.out.println("Please re-type the category\n");
accident = input.nextLine();}
}
public static void carcrash (){
Scanner crashreader = new Scanner(System.in); // Create a Scanner object
System.out.println("Enter What type of car crash you are involved in: \nhit and run \nvehicle rollover \nsingle or more car accident");
String crashtype = crashreader.nextLine(); // Read user input
if (crashtype.equals ("hit and run")){ // add hit and run,
System.out.println (" 1) Record the most important Information (license plate number, make of the car and model, color of the car).");
System.out.println (" 2) Call 911 and report the incident to police.");
System.out.println (" 3) When the police arive tell them names of possible witnesses, exact location of accident, direction the driver was heading");
System.out.println (" 4) Contact your insurance company. Your insurance company will begin the claims process");
}
else if (crashtype.equals ("vehicle rollover")){
System.out.println (" 1) If your vehicle begins to tip and you suspect it is about to roll over, immediately remove your feet from the pedals to prevent ankle breakage. ");
System.out.println (" 2) Release the steering wheel, crossing your arms against your chest as you press your body deep into the seat.");
System.out.println (" 3) Make sure not to lean forward when the car rolls, as this can increase the occurrence of arm breaks and traumatic brain injury.");
System.out.println (" 4) When the car has stopped rolling, brace your feet against the floor to stabilize your body in stillness and assess the damage to yourself and your passengers.");
System.out.println (" 5) Everyone should run their hands across their head/hair checking for broken glass, blood or severe injury that may not be immediately noticed in the event of traumatic incident.");
System.out.println (" 6) Take a few deep breaths to recalibrate your nervous system.");
System.out.println (" 7) If anyone is injured, do not move them. Call 911 immediately.");
System.out.println (" 8) Turn your engine off");
System.out.println (" 9) If you land upside-down and you appear to be uninjured, reach toward your ceiling, bracing yourself with one hand while stabilizing your feet on the floor of the vehicle, and then undo your seat belt.");
System.out.println (" 10) Check your windows to determine the safest exit and crawl towards it. ");
System.out.println (" 11) Once you’re free of the car, assist any passengers with their exit and then move as quickly as possible away from the vehicle");
System.out.println (" 12) Wait for emergency services");
}
else if (crashtype.equals ("single or more car accident")){
Scanner carnumber = new Scanner(System.in); // Create a Scanner object
System.out.println("Enter the number of cars involved in the crash");
int n = carnumber.nextInt();
if (n == 1){
System.out.println (" 1) Move to a safe area (if you can)");
System.out.println (" 2) Stop your vehicle and get out");
System.out.println (" 3) Call the police to the scene");
System.out.println (" 4) Document the scene with photos");
System.out.println (" 5) File your insurance claim with your insurance company");
}
else if (n > 1){
System.out.println (" 1) Move to a safe area (if you can)");
System.out.println (" 2) Stop your vehicle and get out");
System.out.println (" 3) Call the police to the scene");
System.out.println (" 4) Gather info (other driver and passenger names, other cars license plate numbers, other cars insurance info, makes and models of all vehicles involved");
System.out.println (" 4) Document the scene with photos");
System.out.println (" 5) File your insurance claim with your insurance company");
}
}
}
}