Tracing Table

Watch this thread
NLS2790
Badges: 1
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#1
Report Thread starter 1 month ago
#1
I have question, i did a pseudocode but im confused as how to do the tracing table. and please help to check if my pseudocode is correct or wrong.
Step 1 = Start
Step 2 = Input item price
Step 3 = Input item quantity
Step 4 = Calculate price of every item by multiplying it with the quantity of that item
PriceofProduct = ItemPrice * ItemQuantity
Step 5 = If to add more items, repeat Step 2 until Step 5, else proceed Step 6
Step 6 = Add all items price
TotalPrice = PriceofProduct1 + PriceofProduct2 + ……. PriceofProductN
Step 7 = check Discount
If (TotalPrice < 100) {
discount =10
} else if (TotalPrice > 100 AND TotalPrice <= 200) {
discount = 15
} else if (TotalPrice > 200 AND TotalPrice <= 300) {
discount = 20
} else if (TotalPrice > 300) {
discount = 25
}
Step 8 = To get the final GrandTotal reduce discount
GrandTotal = TotalPrice - ((TotalPrice * discount)/100);
0
reply
-Himaya-
Badges: 12
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#2
Report 1 month ago
#2
your pseudocode seems correct, altough im not sure what it was supposed to do
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest

How are you feeling about your SQA results?

They're better than I expected (20)
32.79%
They're what I expected (19)
31.15%
They're worse than what I expected (22)
36.07%

Watched Threads

View All