Skip to content

Instantly share code, notes, and snippets.

@khkred
Forked from udacityandroid/Option A
Created June 19, 2018 04:57
Show Gist options
  • Save khkred/fb8f5f5919fe773894f6bdf56b2cd890 to your computer and use it in GitHub Desktop.
Save khkred/fb8f5f5919fe773894f6bdf56b2cd890 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