Skip to content

Comparator Interface in Gridworld

Listen to “Comparator Interface in Gridworld”

Episode synopsis

Here is a customized World for Gridworld where the message on the top is updated to show how many bugs there are and the location of the furthest Bug in the grid. You need to implement the Comparator interface for the grid world Bug class. You need to define a compare method that returns an int. Get the location of each Bug and use the compareTo method of Location. Here is the starter code: apcs.mathorama.com mpeg4 movieQuicktime movie

More episodes of the podcast APCS Java

ZARZA Studio — Your station on air today: library, music clock, schedule, studio and reports, from the browser.

Meet ZARZA Studio
— on air now — stations in the catalogue 2,025,465 podcasts — countries