Skip to content

Instantly share code, notes, and snippets.

@sanhsa
Forked from udacityandroid/Calculate price method
Created April 11, 2018 14:50
Show Gist options
  • Save sanhsa/9e08610d6141e17db0772a796a33c4c9 to your computer and use it in GitHub Desktop.
Save sanhsa/9e08610d6141e17db0772a796a33c4c9 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