Skip to content

Instantly share code, notes, and snippets.

@Mohanad0
Forked from udacityandroid/Option A
Created June 3, 2018 22:24
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 Mohanad0/b1b58a192edde81e67613e827e70ad7d to your computer and use it in GitHub Desktop.
Save Mohanad0/b1b58a192edde81e67613e827e70ad7d to your computer and use it in GitHub Desktop.
Android Development for Beginners : Calculate the Price Method
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private int calculate price(int quantity {
int price = quantity * 5;
return price;
}
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private calculatePrice(int quantity)
int price = quantity * 5;
return price;
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private int calculatePrice(int quantity) {
int price = quantity * 5;
return price;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment