Skip to content

Instantly share code, notes, and snippets.

@lukaffm
Forked from udacityandroid/Option A
Created December 12, 2017 08:06
Show Gist options
  • Save lukaffm/19ec23684413e4dfa07d1b74ee5a5d05 to your computer and use it in GitHub Desktop.
Save lukaffm/19ec23684413e4dfa07d1b74ee5a5d05 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