Documente Academic
Documente Profesional
Documente Cultură
Answers of Assignment 5:
1. The Motion Manufacturing Company assembles bicycles, tricycles, scooters,
rollerblades and other outdoor sports equipment. Each outdoor product is built
using many parts, which vary from product to product. Interviews with the
head parts clerk have resulted in a list of elements for the Product-Part Listing,
showing which parts are used in the manufacture of each product. A prototype
of the Product-Part Listing is illustrated in Figure 1.
Create a data structure dictionary entry for the Product-Part Listing. The head parts clerk
has informed us that there are never more than 50 different parts for each product.
6. A computer supplies firm called True Disk has set up accounts for countless
business in Hong Kong. True Disk sends out invoices monthly and will give
discounts if payments are made within 10 days. The discounting policy is as
follows: If the amount of the order for computer supplies is greater than $1,000,
subtract 4 percent for the order; if the amount is between $500 and $1,000,
subtract a 2 percent discount; if the amount is less than $500, do not apply any
discount. Any special order (computer furniture, for example) is exempt from
all discounting.
Develop (a) a Decision Table, (b) a Decision Tree, and (c) Structured English for True
Disk discounting decisions, where the conditions alternatives are limited to Y and N.
a)
Conditions and Actions 1 2 3 4
Payment less than or equal 10 days N Y Y N
Payment greater than 10 days Y N Y N
Order amount greater than $1,000 N Y N Y
Order amount between $500 and $1,000 Y N N Y
Order amount less than $500 Y Y N N
4% discount X X X
2% discount X X X
b)