-
-
Save surendra554/2c6a403005b0989a9a54c0ba52357df0 to your computer and use it in GitHub Desktop.
Android Development for Beginners : Calculate the Price Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculates the price of the order based on the current quantity. | |
* | |
* @return the price | |
*/ | |
private calculatePrice(int quantity) | |
int price = quantity * 5; | |
return price; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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
android app development declaration method