Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this lab you will write a program, which will help you choose the appropriate solution to the situation you are in. The program will

For this lab you will write a program, which will help you choose the appropriate solution to the situation you are in. The program will prompt the user and ask questions. Then depending on the answer it will ask one more question, to better narrow down results. For this lab you will use a switch, if-else, if-else-if and you will also compare strings.

To get started, create a new java file. Inside the file declare a new class and the main method. The class name should be Islandsurvival.

1. ask the question what is the first thing to do, build a shelter, find food and water, or enjoy your time on the beach?

2. for the answer build a shelter, ask the next question should you take a nap or signal for help?

- if they answer take a nap have the program end and say you lose

- if they answer signal for help have the program end and say you survive the island.

3. for the answer find food and water, ask the next question should you cook the food or eat it raw?

-if they answer cook the food tell them to go get fire wood and wait till help arrives.

-if they answer eat the food raw tell them they got food poisoning and died.

4. for the answer enjoy your time on the beach, tell them they went swimming with the turtles, then fell asleep in the sand and the tide got too high and they died.

Please let me know if you have any questions thanks.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

Write the sum in expanded form. n+3 2 j=n

Answered: 1 week ago