Of course coming next, the Programming Assignment Instructions,
which I'm going over in this video, but
let me talk to you about how you're going to submit the assignment.
So as usual, what you'll do is, you'll do a quiz, just like in previous modules,
to check your understanding of the concepts.
And to make sure you've actually done the programming assignment correctly.
But in this module, you're gonna have an extra piece.
Rather than just taking a quiz, we're actually going to ask you to submit
a peer-review assignment talking about part of your programming assignment for
this module.
So, what's a little weird is you're going to see two peer-review assignments,
and they're right next to each other.
So you can see one right here and the other right there.
One of them has a due date, meaning that's the one that's actually due for a grade.
The other one that you see right before it, this one is just basically
a non-graded, an optional peer review assignment, and
it's actually identical to the graded version of the peer-review assignment.
Now, you may be wondering, why do we have an optional version of the assignment
that's identical to the sort of required version of the assignment?
And the reason for this is that we want you to be able to get preliminary
feedback from your peers in a quick turnaround.
So that you can get some feedback to incorporate into the submission that
you ultimately submit for a grade.
So this version, this ungraded peer assignment, is optional.
But you can use it to submit your peer-review assignment and
get some quick feedback from your peers, make some improvements on your
peer-review assignment, and then submit it for a grade by the due date.
So now that we've looked at how you're going to submit your programming
assignment in this module, let's go back and
take a look at what you're actually going to do.
So, the first steps are the usual steps.
We want you to find an open starter code and
take a look at it, then we're asking you to compare our implementation to yours,
and this is really more of a reflective question.
How does what we did in the module five implementation compare to your module
five implementation?
Be ready to reflect on that in the quiz.
The next part, you're going to be implementing the code to sort.
So the first step says to implement the comparable interface in Earthquake Marker.
So we go over here to the Earthquake Marker file, and you can
see that there's a to-do in here that says, implement the comparable interface.
And so you need to figure out what that means,
how do we change the class header so that it implements the comparable interface?
And then, of course, there's a second part to implement to the comparable interface
which is to implement all the methods in the interface.
In this case it's just this one method, compareTo.
And you'll see a TODO down here as well.
And remember the compareTo compares the calling object Earthquake Marker,
to the parameter EarthquakeMarker.
And returns either a negative value, zero, or
a positive value depending on the relationship between those two objects.
And it's gonna be up to you to figure out how to do the comparison and
return the correct value so that you get your earthquakes sorted in reverse order.
All right, and then the second half of that piece is to implement this method in
EarthquakeCityMap, so we go back over here to EarthquakeCityMap, and
you'll be implementing a method.
You can click here to this little TODO.
We're gonna implement this method sortAndPrint, and
that takes a parameter, the number of earthquakes we want to print, and
it's going to print out the earthquakes in reverse order of their magnitude.
So it's gonna be strongest magnitude first and then weaker and weaker.
So you're gonna implement that method here, and
then you'll wanna call it from the setup method.
So you'll be adding your call somewhere in here in the setup method.