4.8. Solutions: Mini Specifications

Exercise 1: Hopper’s Choppers

There were so many decisions to make that we thought a decision table was the best way to express the policy.

Image

The questions “Provisional bookings?” and “Employee bookings?” are contractions of “Are there any provisional or employee bookings already established?” The dash is used to show indifference. Given the other answers in the column, the answer to this question doesn’t matter.

The RECORD BOOKING action results in the data model in Figure 4.8.1.

Image

Figure 4.8.1: The data model that results from the RECORD BOOKING action.

Seats are allocated on a first-come, first-served basis. Larry didn’t mention whether customers could ask for particular seats. If Grace’s data dictionary is correct, then Larry must allocate seats starting with seat number 1 and continue until there are no more. However, we should check this with Larry.

Exercise 2: Terry’s Ski Tuning Service

This one looks better written in structured language:

For each SERVICE TICKET

For each SERVICE PERFORMED

Find the corresponding entry in the RATES TABLE

Accumulate the SERVICE RATE into TOTAL CHARGE

If TECHNICIAN is “Terry” or “Joel”

Increment the TOTAL CHARGE by 15%

If (DAY OF WEEK is “Tuesday” or “Wednesday”) and (TIME OF DAY is “Night”)

Discount TOTAL CHARGE by 20%

If TIME OF DAY is “Day”

Add $20 to TOTAL CHARGE

Issue CUSTOMER BILL

Sometimes, it is only when you come to write the mini specification that you discover the policy is not as clear as it could be. For instance, our specification takes the view that the $20 is neither discountable, nor subject to a premium. It is added after the other calculations. We also interpret the policy to say that all services are discounted on Tuesday or Wednesday nights, as is Terry’s and Joel’s loading. We will have to check these assumptions with Terry.

This mini specification demonstrates one of the problems of systems analysis: It never seems to end. However, it is far better to ask Terry now than to implement an incorrect system.

When you are satisfied with your mini specifications, it’s time to write some for Piccadilly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.105.193