Question: Question 3 : Write a java program to assign the emergency department to its phone number. Use the table given below. table [ [

Question 3:
Write a java program to assign the emergency department to its phone number. Use the table given below.
\table[[Emergency Department,Phone Number],[Police,999],[Ambulance,997],[Firefighting,998],[Traffic Police,993]]
Display the following menu to the user:
**********************************************************************
Emergency Department:
Police
Ambulance
Fire
Traffic PoliceChoose your option [1,2,3,4] :
Hint 1: Use Scanner class and nextInt() method to read a number corresponding to a department.
Hint 2: Use switch-case statement to display the phone number of the emergency department.
Question 3 : Write a java program to assign the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!