Skip to content

Update MainActivity.java #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public class MainActivity extends AppCompatActivity {

int quantity = 2;
int quantity = 2; //Creation of a variable called quantity, that is an integer, with the value 2.

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -81,7 +81,7 @@ public void submitOrder(View view) {
boolean hasChocolate = chocolateCheckBox.isChecked();

// Calculate the price
int price = calculatePrice(hasWhippedCream, hasChocolate);
int price = calculatePrice(hasWhippedCream, hasChocolate); //Storing the value of the variable price, by calling the method called calculatePrice

// Display the order summary on the screen
String message = createOrderSummary(name, price, hasWhippedCream, hasChocolate);
Expand Down
Loading