Analyze the Logic From the following flowcharts and pseudocode, analyze the logi
ID: 3557880 • Letter: A
Question
Analyze the Logic
From the following flowcharts and pseudocode, analyze the logic to show the outcome of executing the designed program as it is described.
Data Dictionary
See the Key Assignment Template for the Data Dictionary used in the logic for these designs.
Big Buyer Discount
Description
For customers that purchase more than a total purchase amount threshold (initially $200), the system will provide a discount amount (starting at $20). Thus, any time the total purchase exceeds the threshold, the customer should receive the discount amount.
Flowchart
Pseudocode
function bigBuyerDiscount(totalPurchaseAmount : double)
returns double
Create double variable discountThreshold = 200
Create double variable discountAmount = 20
if (totalPurchaseAmount > discountThreshold)
totalPurchaseAmount = totalPurchaseAmount
Explanation / Answer
Here is the first part. I will solve rest when you provide me salesCommitment and applyDiscount logic.
Big Buyer Discount
Analyse:-
all purchases which is greater than 200 will have a discount of 20.
the table entry will be
1 -> $199 -> 199
2 -> $200 -> 200
3 -> $201 -> 181
4 -> $400 -> 380
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.