KotlinCS 124 LogoJava

Index

MP2

MP1

MP0

Android Studio

Git

Add Favorite Places

Learning Objectives
Learning Objectives

MP2 is a step forward from MP1. Rather than making small changes, you’ll be guided through larger additions that mirror code that we’ve provided, as you work to add an entirely new feature to your app.

Specifically, after completing MP2 you should be able to add new features and capabilities to an existing Android app by mimicking existing code. You’ll add a new route to the server, add support for it on the client, and add a new screen allowing the user to add a favorite place to the map. But don’t worry! We’ll guide you every step of the way.

Deadlines
Deadlines

All remaining MP checkpoints have two deadlines. We provide 10 points for getting started on the MP promptly and earning a certain number of points before the early deadline. For MP2, you must earn 30 points by the early deadline. The remainder of the MP is due a few days later.

For MP2 the deadlines are:

Objectives, Testing, and Grading
Objectives, Testing, and Grading

You will receive the MP2 test suites via email.

Next, you’ll want to reconfigure grade.yaml in the root directory of your project to request that we grade Checkpoint 2. If you need to review this process, these steps are covered on the first MP1 lesson.

To pass the test cases and complete MP2, you’ll need to augment the code to provide several new capabilities. However, in most cases the code that we have given you provides a model for you to follow, and we’ll discuss the new ideas that you’ll encounter in the walkthroughs. But as in previous checkpoints, you will spend much more time understanding what the problem is and identifying the code you need to modify than you will actually implementing your solution.

Objectives
Objectives

Our goal in MP2 is to allow the user to add their favorite place to the map. They should be able to long-press on a location on the map and launch a new activity, allowing them to input their description of why that place is their favorite. Once they submit their favorite place, it should appear on the map along with the places provided in the initial data set that we provided you.

Adding this capability requires modifications to several files included in your repository. We’ll walk through what to do and provide suggestions for getting started on the daily lessons.

Testing
Testing

We have provided four test cases to guide your development, and we suggest that you work through them in order:

  1. test0_ServerFavoritePlacePost tests whether you have added support correctly to your server to receive a new favorite place, validate it, and add it to the map. This test will probably take you some time to complete.
  2. test1_ClientFavoritePlacePost tests whether you have added support for adding places to your networking client. Once you have completed server support for adding places, this test is relatively straightforward.
  3. test2_LongPressLaunchesActivity tests whether a long press on the map starts a new activity correctly.
  4. test3_AddPlaceActivity tests whether the new activity works properly, and allows a user to add a new favorite place to the map.

The lessons will proceed through the test suites in the order that we recommend you complete them in.

Grading
Grading

Grading for MP2 is broken down as follows:

You can estimate your grade at any time by using the Grade task available in Android Studio. This is an estimate, not an official score.

Submitting
Submitting

You submit MP2 by pushing to GitHub, in the same way that you did for MP1 and MP0. However, make sure that you have configured grade.yaml before pushing. We grade the checkpoint you have configured in grade.yaml. So make sure that is set up to grade MP2 once you are ready.

Cheating
Cheating

Please review the CS 124 policies on collaboration.

All submitted code will be checked for cheating. Cheaters will receive stiff penalties. Hard-working students who are struggling honestly for their grade demand it.

Scores
Scores

You can view your official MP2 scores below.