Skip to content

Instantly share code, notes, and snippets.

@belalahmedhamed
Forked from udacityandroid/Option A
Created June 10, 2018 07:11
Show Gist options
  • Save belalahmedhamed/73c27859b8e194327dc97bfb5b498871 to your computer and use it in GitHub Desktop.
Save belalahmedhamed/73c27859b8e194327dc97bfb5b498871 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