Write a pseudocode that will accept items bought by a customer and place them in the

appropriate class based on amounts calculated for the bill.
Discounts are applied as follows:
Silver – 1%
Gold – 5%
Platinum – 10%
Tax on Home Products and Appliances is 20%. A general Consumption tax of 17.5% is
to be applied to all grocery items.
The program should accept all items purchased by the customer, place them in the
appropriate class, and calculate discount and tax. A final bill should be output, displaying
items purchased, tax applied to the items based on the typed of product purchased and
total to be paid by customer. Also, display a header on the bill showing the name of the
store, address, telephone number, date of purchase and cashier’s name.

I need help with that same question

ghdhcbcixgkwyf

DECLARE storeName to Shop Choice

DECLARE storeAddress to Lot 22 Catherine Hall Drive, Montego Bay, St. James
DECLARE telephone to 8762345678
DECLARE discount
DECLARE cashierName, todaysDate, class
DECLARE hpaTax to 0.2
DECLARE genconTax to 0.175
DECLARE itemName
DECLARE productType
DECLARE total
DECLARE discountTotal
DECLARE finalBill

WHILE
DISPLAY “Enter the name of cashier for today”
READ cashierName
DISPLAY “Enter today’s date”
READ todaysDate
DISPLAY “Enter name of item(s) you are purchasing”
READ itemName
DISPLAY “Enter your total bill for the item”
READ total
IF total >= 1 and <= 10000
class = Silver
discountTotal = total – (total * 0.01)
ELSE IF total >= 10001 and <= 20000
class = Gold
discountTotal = total – (total * 0.05)
ELSE IF total >= 20001
class = Platinum
discountTotal = total – (total * 0.1)
DISPLAY “Your discounted total is:” discountTotal
READ
ENDIF
DISPLAY “Enter the type of product purchased. Appliance or Grocery”
READ productType
IF productType = Appliance
finalBill = discountTotal + (hpaTax * discountTotal)
ELSE
finalBill = discountTotal + (genconTax * discountTotal)
DISPLAY “Your final bill is:” finalBill
READ
ENDIF
DISPLAY storeName
DISPLAY storeAddress
DISPLAY telephone
DISPLAY todaysDate
DISPLAY cashierName
READ
DISPLAY “Your item(s) purchased is:” itemName
DISPLAY “Your discounted total is:” discountTotal
DISPLAY “Your final bill with tax is:” finalBill
DISPLAY “Your class is:” class
DISPLAY “Thank you for shopping with us!!!”
READ

ENDWHILE
STOP

how would you create a flow chart from that code

To solve this problem, the pseudocode can be structured as follows:

1. Declare and initialize variables:
- total_bill = 0 (to keep track of the total bill)
- silver_discount = 0.01 (1% discount for silver customers)
- gold_discount = 0.05 (5% discount for gold customers)
- platinum_discount = 0.1 (10% discount for platinum customers)
- home_product_tax = 0.2 (20% tax on home products and appliances)
- grocery_tax = 0.175 (17.5% consumption tax on grocery items)

2. Prompt the cashier for the customer's name, address, telephone number, and date of purchase.

3. Display the store's name, address, telephone number, date of purchase, and the cashier's name as the header of the bill.

4. Prompt the cashier to enter the items purchased by the customer:
- Prompt for the name, price, type (home products/appliances or grocery item), and customer class.

5. Repeat the following steps until all items are entered:
a. Calculate the tax based on the item's type:
- If the item is a home product/appliance, apply the home_product_tax.
- If the item is a grocery item, apply the grocery_tax.
b. Calculate the discount based on the customer's class:
- If the customer is silver, multiply the total price by (1 - silver_discount).
- If the customer is gold, multiply the total price by (1 - gold_discount).
- If the customer is platinum, multiply the total price by (1 - platinum_discount).
c. Add the discounted total price to the total_bill variable.

6. Display the items purchased by the customer, including their names, prices, taxes applied, and total price after discount.

7. Calculate the final total bill by adding the taxes and applying the discounts.

8. Display the final total bill to be paid by the customer, including a breakdown of taxes and discounts.

Example Pseudocode:

```
total_bill = 0
silver_discount = 0.01
gold_discount = 0.05
platinum_discount = 0.1
home_product_tax = 0.2
grocery_tax = 0.175

customer_name = input("Enter customer's name: ")
customer_address = input("Enter customer's address: ")
customer_telephone = input("Enter customer's telephone number: ")
date_of_purchase = input("Enter date of purchase: ")
cashier_name = input("Enter cashier's name: ")

print("Store Name: Your Store")
print("Address: Your Store Address")
print("Telephone: Your Store Telephone")
print("Date of Purchase:", date_of_purchase)
print("Cashier: ", cashier_name)

item_count = input("Enter the number of items purchased: ")

for i in range(item_count):
item_name = input("Enter item name: ")
item_price = float(input("Enter item price: "))
item_type = input("Enter item type (home product/appliance or grocery): ")
customer_class = input("Enter customer class (silver, gold, platinum): ")

if item_type == "home product/appliance":
tax = item_price * home_product_tax
elif item_type == "grocery":
tax = item_price * grocery_tax

if customer_class == "silver":
discounted_price = item_price * (1 - silver_discount)
elif customer_class == "gold":
discounted_price = item_price * (1 - gold_discount)
elif customer_class == "platinum":
discounted_price = item_price * (1 - platinum_discount)

total_price = item_price + tax - discounted_price
total_bill += total_price

print("Item: ", item_name)
print("Price: ", item_price)
print("Tax: ", tax)
print("Discounted Price: ", discounted_price)
print("Total Price: ", total_price)

print("Final Amount to be paid by", customer_name, ": ", total_bill)
```

Note: This pseudocode assumes that the input and output statements are adjusted according to the programming language being used.