Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If a user wants to spend more than $200, suggest exclusive suites. If the country is France, also suggest rooms in palaces. If a user

If a user wants to spend more than $200, suggest exclusive suites. If the country is France, also suggest rooms in palaces.

If a user wants to spend more than $250, If the country is Germany. suggest exclusive suites

image text in transcribed

My code

System.out.println("Enter the country you want to visit: "); //input prompt

String country=in.next();//input

if(country.equals("France")){ System.out.println("I suggest exclusive suites."); System.out.print("I also suggest rooms in palaces."); } else(country.equals("Germany")) { System.out.println("I suggest exclusive suites."); /* Executes when the boolean expression 1 is true */ }

}

}

System.out.println("Enter the country you want to 40 39 4 / 4 pts - Click for details PASSE String country=in.next(); //input, 250 france 0 / 4 pts - Click for details FAILE if(country.equals("France"), System.out.println("I suggest exclusive suites.") System.out.print("I also suggest rooms in palaces /* Executes when the boolean expression 1 is try 250 France 4 / 4 pts - Click for details PASSE 250 Germany . 0/4 pts - Click for details FAILE 61 }

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions