Docsity

Functional Decomposition - Banking - Lecture Slides, Slides of Banking and Finance

Partial preview of the text

Download Functional Decomposition - Banking - Lecture Slides and more Slides Banking and Finance in PDF only on Docsity!

Functional Decomposition

  • Also known as top-down development
  • Widely deemed to be a “good thing”
  • Regard thing to be developed as a hierarchy
  • State top level, and decomposing into smaller objects.
  • Decomposition continues until code level.

Scenario

A car hire firm recently installed a terminal which is used to record the dates when cars are hired out and returned. When a car is taken out the reg. no. is keyed in prefixed by ‘[‘ and the date (no. of days since system commissioning) is automatically entered. For returns, no. is keyed in with a ‘]’ and date added.

Computation

  • Computation comprises three parts:
    • Count number of separate contracts (i.e. count the ‘[‘s).
    • Total the number of days for which cars are hired
    • Compute the average.
  • Now write the structured English...

BEGIN Initialise #contracts, total days = 0 Get 1st transaction WHILE not end of transactions DO IF car taken out THEN Inc #contracts total days = total days - taken out date ELSE total days = total days + return date Get next transaction Display #contracts IF #contracts <> 0 Display total days/#contracts END

Changed Requirements

  • Now produce two separate reports:
    • 1 for hire periods < 1 week
    • 1 for hire periods >= 1 week

Changed Requirements

  • Now allow the system to run even when there are contracts outstanding.

Top Down

  • Is reasonable for describing things which are already fully understood
  • Is “natural” as it allows abstraction
  • When developer has a clear idea of the completed result in his mind, he can use top- down to describe on paper what is in his head.

The Myth

  • Many believe they are doing top-down development and doing it successfully:
  • They confuse the method of description with the method of development
  • Development was performed in some hidden way
  • Top-down phase only began when problem already solved

Mistakes compounded

  • Each step is taken in the context generated by the previous step.

A

A1 A2 A

Start again?

  • If first step was ill-chosen, nothing can be done later to retrieve the error.
  • Either press on with a design we know is faulty…
  • …or go back to the beginning and start again.

“The brilliant top-down developer is one who completes the development in his mind’s eye before committing himself to writing down even the top level of decomposition. Where developers are merely skilled and competent…the consequences of their early decisions emerge only at the end of the project: hence the appealing suggestion that it could all be done properly the second time around”

FD Methods

• SSADM

• YSM

• IE

• STRADIS