Skip to content

Instantly share code, notes, and snippets.

@abdahma01
Forked from udacityandroid/Calculate price method
Created February 15, 2018 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdahma01/8edb0dddc2209bb0f4a64c55f5afb5b4 to your computer and use it in GitHub Desktop.
Save abdahma01/8edb0dddc2209bb0f4a64c55f5afb5b4 to your computer and use it in GitHub Desktop.
Add to MainActivity.java
/**
* Calculates the price of the order.
*
* @param quantity is the number of cups of coffee ordered
*/
private void calculatePrice(int quantity) {
int price = quantity * 5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment