-
-
Save mohamedagamy/2ebd16a5cfb83a63ede3f3efde3f70b7 to your computer and use it in GitHub Desktop.
Android Development for Beginners : Calculate the Price Method
This file contains hidden or 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 hidden or 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 hidden or 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