Question: undefined Suppose you want to add some more functionality to the SleighTrack class we wrote in class. Each of the following should be instance methods

undefinedundefined Suppose you want to add some more functionality to the SleighTrack

Suppose you want to add some more functionality to the SleighTrack class we wrote in class. Each of the following should be instance methods you add to SleighTrack: A. (1 point) Write a public boolean allVisited (Set locations) method that returns true iff the current sleighTrack instance has visited all of the given locations. B. (1 point) Write a public int mostPresents() method that returns the highest number of presents delivered to a single location in the current sleighTrack. C. (1 point) Write a public void presentsToCoal (Set locations) method that removes the given locations from the current sleighTrack, if they are in it. So mean! It is possible (but not required) to do each of these without an explicit for loop, by using methods of Map and other classes. Suppose you want to add some more functionality to the SleighTrack class we wrote in class. Each of the following should be instance methods you add to SleighTrack: A. (1 point) Write a public boolean allVisited (Set locations) method that returns true iff the current sleighTrack instance has visited all of the given locations. B. (1 point) Write a public int mostPresents() method that returns the highest number of presents delivered to a single location in the current sleighTrack. C. (1 point) Write a public void presentsToCoal (Set locations) method that removes the given locations from the current sleighTrack, if they are in it. So mean! It is possible (but not required) to do each of these without an explicit for loop, by using methods of Map and other classes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!