Created
June 9, 2015 23:49
-
-
Save udacityandroid/efc863aff5c2ff5784ce to your computer and use it in GitHub Desktop.
Add to MainActivity.java
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. | |
* | |
* @param quantity is the number of cups of coffee ordered | |
*/ | |
private void calculatePrice(int quantity) { | |
int price = quantity * 5; | |
} |
public int displayQuantityB() {
int calculate = quantity * 5;
return calculate;
}
public int displayQuantityB() {
int calculate = quantity * 5;
return calculate;
}
public void submitOrder(View view) {
String priceMessage = "Free";
displayMessage(priceMessage);
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
public int displayQuantityA(int quantity,int price_of_per_coffee) {
int calculate = quantity * price_of_per_coffee;
return calculate;
}