Thursday, April 16, 2009

Assignment

1. Draw a decision tree based on the statement.
2. Develop a decision table for passenger free ticket.

5 A Virginia-based mail-order house specializes in microcomputers and supplies for various microcomputer makes. It offers discounts based on the number of units ordered. When an order is received, an invoice is generated that includes the quantity, unit cost, discount, and shipping and handling charges. The invoice is decomposed into' the following hierarchy:

Invoice-Total is computed on each line-item. All line-item totals are then added to get invoice total. A line-item is extended by multiplying quantity by unit cost. The product is the line-item total.'

Discount is computed as follows:

If Invoice-Total is $3,000 or over, discount is 20 percent.
If Invoice-Total is between $2,000 and $2,999, discount is 10 percent.
If Invoice-Total is between $1,000 and $1,999, discount is 5 percent.
If Invoice-Total is under $1,000, no discount allowed.

Shipping and handling charges depend on whether the computer is to go by UPS or air freight. If the order specifies UPS, then compute as follows:


if weight is under 35 pounds, shipping/handling rate is $30.
If weight is 35 to SS pounds, shipping/handling rate is $45.
If weight is over SS pounds, multiply excess (over S5) by $2 and add $4S to gel shipping/handling ,'ate.
If the order specil1es air freight, then multiply each pound of weight by $1.85 to get rate.

No comments:

Post a Comment