A grocery Application
In a shop there are products which have a discount while others are on promotion. from the data bellow create an algorithm that checks if a customers basket has promotional items or discounted items. Display those that have both discount and promotion in red.
item | price | discount | promo |
---|---|---|---|
bread | 30 | 1 | true |
Rice | 200 | 0 | false |
Meat | 340 | 5 | false |
brai | 340 | 15 | true |
Chkn | 140 | 0 | true |
Soap | 100 | 5 | false |
cremora | 70 | 2 | true |
milk | 80 | 0 | false |
bin | 200 | 0 | true |
bin plastic | 100 | 3 | false |
cerelac | 75 | 2 | true |
Requirements
- if an item has a discount, calculate how much a customer will pay for the item at the till.
- calculate the difference in price (or total amount of money) this customer would have paid if he/she had no discound and when he has the discounts.
- each and every item which is on promotion attracts an additional 10% descount. calculate how much discount will be applied to the basket.
- Creae a beautiful UI for the application