Question: Write a program to make suggestions on lodging in Europe. If a user wants to spend $30 or less on lodging per night, suggest camping.

Write a program to make suggestions on lodging in Europe. If a user wants to spend $30 or less on lodging per night, suggest camping. If a user wants to spend $45 or less but more than $30 per night, suggest youth hostel if the user is 30 years old or younger and adult hostel if the user is older than 30 years old. If a user wants to spend $100 or less but more than $45 per night, suggest hotel. If a user wants to spend $200 or less but more than $100 per night, suggest grant hotel. If a user wants to spend more than $200, suggest exclusive suites. If the country is France, also suggest rooms in palaces. Note that to compare whether a String variable country equals "France", you cannot use country == "France". The correcr way to compare is country.equals("France"). The following are some sample runs: > run LodginginEurope Enter the money you want to spend: 25 I suggest camping. > run LodgingInEurope Enter the money you want to spend: 40 Enter your age: 39 I suggest adult hostel. > run LodgingInEurope Enter the money you want to spend: I suggest hotel. > run LodgingInEurope Enter the money you want to spend: 250 Enter the country you want to visit: Germany I suggest exlusive suites. > run LodgingInEurope Enter the money you want to spend: 250 Enter the country you want to visit: France I suggest exlusive suites. I also suggest rooms in palaces. Full Screen v Grading 5 LodginginEurope.java* * New 1- import java.util.Scanner
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
