Skip to content
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

Assignment I was given,kindly give me both the XML code to build the app interface and the java code to execute it #212

Open
Benorina1 opened this issue Mar 28, 2024 · 0 comments

Comments

@Benorina1
Copy link

a)Design the following activity interface.
IMG_20240328_104658.jpg

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:

IMG_20240328_104912.jpg

NOTE: Except part a), all the other tasks should be achieved when the button labelled CALCULATE is clicked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant