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/29cfaa7c345c1754ad01fef731880282 to your computer and use it in GitHub Desktop.
Save sanhsa/29cfaa7c345c1754ad01fef731880282 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