rushi bhaskar
Jan 9, 2013, 10:47 PM
A Good Tourist Place is defined which fulfill all these following conditions.
The number of tourist spots should be more than seven.
Name of the tourist place should not be null.
Number of visitors to the tourist place must be more then 7 lakhs.
Should have at least 4 types of transport available and should include “Bus” as a transport type
If the place has a transport facility of "Air", the place must have a "5 star" hotel.
If the place has a "3 Star" hotel, then it must also have "4 Star" and "5 Star" hotels.
Write a method:
Boolean isGoodTouristPlace(String name, int numTouristSpots, String[] hotelTypesAvailable, int numVisitors, String[] transportFacilities)
Name Name of the tourist place
NumTouristSpots Number of tourist spots in the place.
HotelTypesAvailable Types of hotels available, e.g. "Budget", "3 Star", "5 Star" etc...
NumVisitors Number of tourists who come to the place every year.
TransportFacilities Types of transport available using which a person can reach this place. e.g. "Air", "Train", "Bus", "Taxi" etc..
The number of tourist spots should be more than seven.
Name of the tourist place should not be null.
Number of visitors to the tourist place must be more then 7 lakhs.
Should have at least 4 types of transport available and should include “Bus” as a transport type
If the place has a transport facility of "Air", the place must have a "5 star" hotel.
If the place has a "3 Star" hotel, then it must also have "4 Star" and "5 Star" hotels.
Write a method:
Boolean isGoodTouristPlace(String name, int numTouristSpots, String[] hotelTypesAvailable, int numVisitors, String[] transportFacilities)
Name Name of the tourist place
NumTouristSpots Number of tourist spots in the place.
HotelTypesAvailable Types of hotels available, e.g. "Budget", "3 Star", "5 Star" etc...
NumVisitors Number of tourists who come to the place every year.
TransportFacilities Types of transport available using which a person can reach this place. e.g. "Air", "Train", "Bus", "Taxi" etc..