subject

The goal of this problem is to practice using appropriate branching statements. You will add to the main method to take in user input and output a message based on the input. This program emulates a detective questioning an eye-witness of a murder. The detective has three suspects each with a potential murder weapon. Based on the eye-witness's user input, the detective will reach a conclusion about the murderer and the murder weapon. If the witness input is "Amos" the detective will output "It was Amos with the candlestick!" If the witness input is "Kevin", the detective will output "It was Kevin with the revolver!" If the witness input is "Juan", the detective will will output "It was Juan with the lead pipe!" Otherwise, the detective will output "We're not sure who that is. We need to investigate further." Your program should also handle situations where the witness input does not use proper-case. Hint: look at the toUpperCase() or equalsignoreCase() method for Strings. Example input: amos Example output: It was Amos with the candlestick! 2 import java. util. Scanner; public class Clue{ public static void main(String[] args) { Scanner scnr = new Scanner(System. in); System. out. println("Who was the murderer?");

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
question
Computers and Technology, 24.06.2019 20:00
Individuals suffering from technology overload feel distressed when deprived of computers and mobile devices.true/fasle
Answers: 2
You know the right answer?
The goal of this problem is to practice using appropriate branching statements. You will add to the...
Questions
question
Mathematics, 20.05.2020 17:58
Questions on the website: 13722363