KS3 Computing/De-Composition

From Wikibooks, open books for an open world
Jump to navigation Jump to search

[IMAGE TO BE INSERTED HERE]


When developing computer systems (programs or applications) - we aim to solve problems. The problem may be to change the patterns of lights, according to the pressing of buttons on a keyboard, as demonstrated above.... It is essential to understand the problem in its entirety so that it can be solved without mistakes. To arrive at this understanding it is essential to analyse the problem by identifying its individual components. In other words: it is necessary to split the problem into sub-problems. This process is called de-composition. This process can lead to a graphical representation of a problem, called a structure diagram:


[IMAGE TO BE INSERTED HERE]


Each of the sub-problems may require further decomposition, leading to more complex structure diagrams.Example of a structure diagram, or structure chart:


[IMAGE TO BE INSERTED HERE]


Decomposition Exercises[edit | edit source]

Each of the following exercises describes a problem. Analyse each problem by identifying some of its sub-problems.

Examples[edit | edit source]

  • In an air traffic control system, one problem would be to prevent planes from flying into each others paths.
  • In a computer gaming system, one problem would be to add to the score when the player has achieved an objective.


Exercise 1[edit | edit source]

De-compose the problem of getting dressed into at least three component parts. Can you apply an order of execution? In other words: which sub-problem needs to be solved before another? Produce a structure diagram.

Exercise 2[edit | edit source]

De-compose the problem of cooking dinner into at least 10 component parts. Can you apply an order of execution? In other words: which sub-problem needs to be solved before another? Produce a structure diagram.

Exercise 3[edit | edit source]

De-compose a simple banking system into at least three component parts. The system needs to allow users to open accounts, close accounts and track money spent and money deposited into the account. Produce a structure diagram.

Exercise 4[edit | edit source]

Consider your favourite game. Identify at least 5 sub-problems which this computer system needs to solve. Produce a structure diagram.

Exercise 5[edit | edit source]

Can you think of an app that you would like to create? Describe the app and identify at least 5 sub-components of the app. Produce a structure diagram.

Decomposition Summary[edit | edit source]

Computational thinking requires the de-composition of problems: the precise identification of the components which make up a bigger problem... this process can lead to a structure diagram. Each of the identified problems needs to be solved and the solutions must be put back together. This process will be part of the implementation of the complete solution.

Decomposition Further Study[edit | edit source]

Find out about modular design and summarise its advantages and disadvantages. The Waterfall and the Spiral are common methods of modular design. More recently, Rapid Application Development (RAD) and Extreme Programming (see also Agile Development and On-Site Development) have increased in popularity. Research each method and summarise how they are used and listing their advantages and disadvantages.