Skip to content

Instantly share code, notes, and snippets.

@ARTNS
Forked from udacityandroid/Option A
Created April 16, 2016 17:38
Show Gist options
  • Save ARTNS/a42fb1072c096491e7b0987079e9092b to your computer and use it in GitHub Desktop.
Save ARTNS/a42fb1072c096491e7b0987079e9092b 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