In: Computer Science
•Preferred customers who order more than $1000 are entitled to a 5% discount, and an additional 5% discount if they used the store credit card. •Preferred customers who do not order more than $1000 receive a $25 bonus coupon. •All other customers receive a $5 bonus coupon.Design the Logic in Structured English Design the Logic using Decision Tablex•Preferred customers who order more than $1000 are entitled to a 5% discount, and an additional 5% discount if they used the store credit card. •Preferred customers who do not order more than $1000 receive a $25 bonus coupon. •All other customers receive a $5 bonus coupon.
Structured English:
Structured English is a subset of standard English that describes logical process clearly and apparently. When using structured English,be mindful of the following guidelines
1. Use only the three building blocks of sequence,selection and iteration.
2. Use indentation for readability.
3. Use limited vocabulary.
The structured English for the given information is
Decision table:
A decision table is a logical structure that shows every combinations of conditions ans outcomes. Analysis often use decision tables to describe a process and ensure that they have consider all possible situations.
when documenting a process it is important to ensure that every possibility is listed. In this example the process description contains two conditions:product stock status and customer credit status,if both conditions are met the order is accepted otherwise rejected.
After all conditions and outcomes has been verified the next step is to create decision table
sales promotion policy-Holiday season
1.preferred customers who order $1000 or more are entitled to give 5% discount and an additional % discount if they used our charge card.
2.preferred customers who do not order $1000 or more will receive a $25 bonus coupon.
3.All other customer will receive a $5 bonus coupon.
Rules:
1. In rule1 all the conditions are satisfied so both 5% discounts appiled.
2. In rule2 a preferred customer order $1000 or more but not used our charge card so only 5% discount applied.
3. Rules 3 and 4 can be combined into a single rule,if the preferred customer do not order $1000 or more,it does not matter whether they use our charge card-either way they earn only $25 bonus coupon.
4. Rules 5,6,7,8 can be combined into a single rule because if the customer is not a preferred customer he only earns $5 bonus coupon and the other conditions sinply do not matter.