You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write code to ensure that the quantity of each item bought does not exceed 4. If it does, a toast message should display the message: “You cannot buy more than 4 items”. Similarly, if no quantity value is provided, a toast message should display the words “You must enter quantity”
Write code to show the total amount spent on each item and the grand total. In this case, you can hard code the unit price. The quantity is typed on the interface.
Write a method that has two parameters namely the grand total and the discount percentage. The method should apply the discount on the grand total and display the discount amount on the edittext labelled DISCOUNT and the net amount paid on the edittext labelled NET PAY. In order to earn all marks for this question ensure you test all discount cases and provide a screenshot of the activity showing the discounted amount and the NET PAY in each case.
Use the following discount criteria:
NOTE: Except part a), all the other tasks should be achieved when the button labelled CALCULATE is clicked.
The text was updated successfully, but these errors were encountered:
a)Design the following activity interface.
Write code to ensure that the quantity of each item bought does not exceed 4. If it does, a toast message should display the message: “You cannot buy more than 4 items”. Similarly, if no quantity value is provided, a toast message should display the words “You must enter quantity”
Write code to show the total amount spent on each item and the grand total. In this case, you can hard code the unit price. The quantity is typed on the interface.
Write a method that has two parameters namely the grand total and the discount percentage. The method should apply the discount on the grand total and display the discount amount on the edittext labelled DISCOUNT and the net amount paid on the edittext labelled NET PAY. In order to earn all marks for this question ensure you test all discount cases and provide a screenshot of the activity showing the discounted amount and the NET PAY in each case.
Use the following discount criteria:
NOTE: Except part a), all the other tasks should be achieved when the button labelled CALCULATE is clicked.
The text was updated successfully, but these errors were encountered: