(Java)
recordTrip
Write a method called recordTrip that records information abouttrips taken by people. Trip information will be stored in a map inwhich the keys are names of people and the values are sets of placenames. The method will take as parameters the map followed by aperson’s name followed by a place name. For example, if we startwith an empty map stored in a variable called trips and we make thefollowing calls:
recordTrip(trips, “John”, “London”);
recordTrip(trips, “Sally”, “Seattle”);
recordTrip(trips, “John”, “Paris”);
recordTrip(trips, “Sally”, “San Francisco”);
recordTrip(trips, “John”, “NYC”);
recordTrip(trips, “John”, “Paris”);
the map would store the following values after these calls:?
{John=[London, NYC, Paris], Sally=[San Francisco, Seattle]}?
Notice that the map
PayPal Gateway not configured
PayPal Gateway not configured