Skip to content

Instantly share code, notes, and snippets.

@ZafarDorna
Forked from udacityandroid/Option A
Created August 31, 2016 11:12
Show Gist options
  • Save ZafarDorna/e3c8ad5ca5c5d37c29553d1ef39bf7de to your computer and use it in GitHub Desktop.
Save ZafarDorna/e3c8ad5ca5c5d37c29553d1ef39bf7de 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