Skip to content

Instantly share code, notes, and snippets.

@alamrizy
Forked from udacityandroid/Calculate price method
Created October 6, 2018 15:05
Show Gist options
  • Save alamrizy/f7c3238f4b365cab5fd977c64099d57c to your computer and use it in GitHub Desktop.
Save alamrizy/f7c3238f4b365cab5fd977c64099d57c 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