In Java Project Emergency Response Class The North American

In Java!!!!

(Project: Emergency Response Class) The North American emergency response service, 9-1-1, connects callers to a local Public Service Answering Point (PSAP). Traditionally, the PSAP would ask the caller for identification information—including the caller’s address, phone number and the nature of the emergency, then dispatch the appropriate emergency responders (such as the police, an ambulance or the fire department). Enhanced 9-1-1 (or E9-1-1) uses computers and databases to determine the caller’s physical address, directs the call to the nearest PSAP, and displays the caller’s phone number and address to the call taker. Wireless Enhanced 9-1-1 provides call takers with identification information for wireless calls. Rolled out in two phases, the first phase required carriers to provide the wireless phone number and the location of the cell site or base station transmitting the call. The second phase required carriers to provide the location of the caller (using technologies such as GPS). To learn more about 9-1-1, visit http://www.fcc.gov/pshs/services/911-services/Welcome.html and http://people.howstuffworks.com/9-1-1.htm. An important part of creating a class is determining the class’s attributes (instance variables). For this class design exercise, research 9-1-1 services on the Internet. Then, design a class called Emergency that might be used in an object-oriented 9-1-1 emergency response system. List the attributes that an object of this class might use to represent the emergency. For example, the class might include information on who reported the emergency (including their phone number), the location of the emergency, the time of the report, the nature of the emergency, the type of response and the status of the response. The class attributes should completely describe the nature of the problem and what’s happening to resolve that problem.

Solution

collecting the basic information from the user is main here in this case. so collect the data of the user by createtinga a class.

import java.util.*;
        import java.text.*;
        public class EmergencyUSA {
        DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss\");
        Date curDate = new Date();
        Calendar cal = Calendar.getInstance();
        private String fullName;
        private String address;
        private String phoneNumber;
        private String emergencyType;
        private String severityLevel;
        private String responseType;
        private String statusType=\"registered\";
      
        public EmergencyUSA(String fName, String location, String phone, String emergency, String severity,
                String response, String status){
            fullName = fName;
            address = location;
            phoneNumber = phone;
            emergencyType = emergency;
            severityLevel = severity;
            responseType = response;
            statusType = status;
        }
      
        EmergencyUSA(){
           System.out.println(\"from report \");
        }
        public void setFullName(String fullName){
            this.fullName = fullName;
         }
        public String getFullName(){
            return fullName;
        }
        public void setAddress(String address){
           this.address=address;
            }
        public String getAddress(){
            return address;
        }
        public void setPhoneNumber(String phoneNumber){
           this.phoneNumber=phoneNumber;
        }
        public String getPhoneNumber(){
            return phoneNumber;
        }
        public void setEmergencyType(String emergencyType){
           this.emergencyType=emergencyType;
        }
        public String getEmergencyType(){
            return emergencyType;
        }
        public void setSeverityLevel(String severityLevel){
           this.severityLevel=severityLevel;
        }
        public String getSeverityLevel(){
            return severityLevel;
        }
        public String getResponseType(){
            return \"Alright, we have placed someone about your emergency!\";
        }
      
        public String getStatusType() {
           return statusType;
       }

       public void setStatusType(String statusType) {
           this.statusType = statusType;
       }

       public String statusType(){
            return \"successfuly registerd\";
        }
        }
      
     
     import java.util.Scanner;
        public class Report {
        public static void main(String[] args) {
           Scanner sr = new Scanner(System.in);
             String statusType;
             EmergencyUSA emergencyInfo = new EmergencyUSA();
              System.out.println(\"in reporting\");
             System.err.println(\"Emergency Report Information: /n\");
           
             System.out.println(\"What is your name?: \" + emergencyInfo.getFullName());
             String fullName=sr.nextLine();
           
             System.out.println(\"Where are you located?: \" + emergencyInfo.getAddress());
             String address= sr.nextLine();
           
             System.out.println(\"What is your phone number?: \"+ emergencyInfo.getPhoneNumber());
             String phoneNumber=sr.nextLine();
          
             System.out.println(\"What is the nature of your emergency?: \" + emergencyInfo.getEmergencyType());
             String emergencyType =sr.nextLine();
          
             System.out.println(\"What is the severity of your emergency?: \" + emergencyInfo.getSeverityLevel());
             String severityLevel= sr.nextLine();
             emergencyInfo.getStatusType();
        }
        }

In Java!!!! (Project: Emergency Response Class) The North American emergency response service, 9-1-1, connects callers to a local Public Service Answering Point
In Java!!!! (Project: Emergency Response Class) The North American emergency response service, 9-1-1, connects callers to a local Public Service Answering Point
In Java!!!! (Project: Emergency Response Class) The North American emergency response service, 9-1-1, connects callers to a local Public Service Answering Point

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site