1 / 18

Functional Decomposition

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

landers
Télécharger la présentation

Functional Decomposition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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. Remember, Dilbert is real life

  2. 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. Remember, Dilbert is real life

  3. Functional Requirements • Manager wants a system to: • display number of separate hire contracts • display the average number of days for which a car is hired. • Thus we need to: • Compute the information • Output it Remember, Dilbert is real life

  4. 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... Remember, Dilbert is real life

  5. 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 Remember, Dilbert is real life

  6. Changed Requirements • Now amend the system so that it also displays the longest period of hire. Remember, Dilbert is real life

  7. Changed Requirements #2 • Now produce two separate reports: • 1 for hire periods < 1 week • 1 for hire periods >= 1 week Remember, Dilbert is real life

  8. Changed Requirements #3 • Now allow the system to run even when there are contracts outstanding. Remember, Dilbert is real life

  9. What’s the problem here? • The system reflects designer’s interest in algorithms to compute efficiently the elapsed time. • What does the system design not reflect?… • …the user’s main concern - the real world of hire contracts. Remember, Dilbert is real life

  10. 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. Remember, Dilbert is real life

  11. 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 Remember, Dilbert is real life

  12. Well, so what? • A method must allow solution of problems to which developer does not already know the solution. • Top-down compels developer to make largest and most far reaching decisions at the start… • …when we know least about the problem. Remember, Dilbert is real life

  13. Mistakes compounded • Each step is taken in the context generated by the previous step. A A1 A2 A3 Remember, Dilbert is real life

  14. 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. Remember, Dilbert is real life

  15. A Solution? • Brooks states, the “…question, therefore, is not whether to build a pilot system and throw it away. You will do that… Hence plan to throw one away; you will anyhow.” • Jackson paraphrases this view as “once to do it, and once to do it properly”. Remember, Dilbert is real life

  16. “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” Remember, Dilbert is real life

  17. FD Methods • SSADM • YSM • IE • STRADIS • … • ... Remember, Dilbert is real life

  18. No FD? • Jackson System Development (1983), or JSD does not use Functional Decomposition. • Neither did JSP (1975). Though you may not have noticed this. Remember, Dilbert is real life

More Related