Main Module
Declare itemName As String
Declare itemQuantity As Integer
Declare itemPrice As Real
Declare itemTotal As Real
Call GetInput(itemName,itemQuantity,itemPrice)
itemTotal = Call CalculateTotalPrice(itemQuantity,itemPrice)
Call DisplayResult(itemName,itemTotal)
End Main

Module GetInput (itemName As String,itemQuantity As Integer,itemPrice As Real)
Display “Please enter item Name”
Get itemName
Display “Please enter quantity of item bought”
Get itemQuantity
Display “Please enter item price”
Get itemPrice
End GetInput

Module CalculateTotalPrice (itemQuantity As Integer,itemPrice As Real) As Real
Declare itemTotal As Real
itemTotal = itemQuantity * itemPrice
Return itemTotal
End CalculateTotalPrice

Module DisplayResult(itemName As String,itemTotal As Real)
Display “The total price of “,itemName, “would be “, itemTotal
End Module

All I need to do is add this in to my pseudocode The owner of the store now wants additional features for his application. He now wants to be able to give discounts to people who purchase more than 4 of a single item. The discount should apply to that item only and should be 10%. He also wants to be able to add tax, the current tax rate is 7.5 % Finally he wants to be able to continue to add new items to one order. When he is done entering the items for the order he should be able to see what the subtotal is, what the final tax is and what the final total is. This should be the only time the subtotal is displayed. Please I need someone to help me out sort of in a bind right now would really appreciate it.

I would suggest using a custom structure(StoreItem) for each item chosen with name, quantity, price per each, total cost, and discount as properties of the structure. You might have a method to adjust discount terms

Then another structure(Order) that containbs a list of StoreItem, subtotal, tax, net total as properties. You could have methods to add new item, change tax rate, update totals.

You will also need a structure to hold the master list of items from which to chose. This would have name and price as properties and methods to change the name, and price, and to add a new item.

This will simplify your code tremendously, the user choses an item and quantity, the discount is applied if applicable, and that is added to the Order with the totals updated.

commented: Again, great help! +14
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.