Skip to content

Instantly share code, notes, and snippets.

@pbasl
Forked from udacityandroid/Calculate price method
Created October 26, 2016 17:09
Show Gist options
  • Save pbasl/21241feadc74bfe204dfc74ec2212620 to your computer and use it in GitHub Desktop.
Save pbasl/21241feadc74bfe204dfc74ec2212620 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