java recordtrip write a method called recordtrip that records information abouttrip 5122007

(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 needs to construct a set for each person tostore the names of the places they have visited. The sets itconstructs should store the place names in alphabetical order. Youmay construct iterators and the sets that store place names, butyou are not allowed to construct other structured objects (nostring, set, list, etc.).? . . .

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now