To wrap up MP3 we'll return to our restaurant activity and update the view to incorporate some of the new information we can now compute about each restaurant. Most of our work will be in the restaurant activity and it's layout, but there are a few other things to fix as well.
Our final task (!) on the machine project is to update our restaurant view to display two new pieces of information:
You'll note that these two pieces of data can be derived in a straightforward way from the results of calling the two new methods that you just added to your
getRelatedInOrder. (If there are ties, you can still just display the first restaurant from the list.)
So once you completed the first test suite cases from MP3, you are close to being finished.
However, we still have a bit more work to do to make the results of these methods available to our
Let's discuss a few of the remaining steps.
One hint for Java is that, when setting the text content of a
TextView, you must pass a
If you need to convert a primitive type to a
String, you may use
As a reminder, on lessons where we focus on the machine project we will not assign a homework problem! However, the lesson will usually focus on helping you complete a particular part of the MP test suite, and so we encourage you to spend time on that in lieu of a homework problem.
Today your goal should be to complete the third MP3 test case:
And, when you do, you'll have completed the MP!