Create an algorithm, pseudocode and flowchart. Phoenix store wants a daily sales transaction. Computer will compute and display total sales per transaction and discount amount given to senior citizen, person with disabilities and with membership card. This store only sells the following books. English 1, English 2, English 3, Physics 1, Physics 2, Physics 3, Introduction to Computer Science, Python, WPF, Web Development, Psychology, Chemistry 2, Our Daily Bread. Price are not permanent and depends based on entry of staff. The books not sold per transaction, corresponding prices equivalent to zero, books sold per transaction and prices of each book vary to entry of the staff. Get the total sales and discount amount.
Total sales= sum of the prices each book sells by bookstore
Discount for Senior Citizen= 30% of total sales per transaction
Discount for PWD=20% of total sales per transaction
Discount for Members=15% of total sales per transaction
Note: no discounts will be given to regular customers
Algorithm:
Customer details with age and physical status(disability)
Available Books with price card
Add book to shopping cart
total price of books
If(age>60)
customer is senior citizen, offered discount = 30% on total price of books
if(disability==true)
customer have physical disability, so offered discount = 20%
if(acquired membership-card==true)
offered discount = 15%
transaction amount=total price of books -30% of total price -20% of total price-15% of total price
else
if(acquired membership-card==true)
offered discount = 15%
transaction amount = total price of books-30% of total price-15% of total price
else
transaction amount = total price of books-30% of total price
else
if(disability==true)
customer have physical disability, so offered discount = 20%
transaction amount = total price of books-20% of total price-15% of total price
if(acquired membership-card==true)
offered discount = 15%
Comments
Leave a comment