# 02 - Decomposition

1. What is decomposition?

The process of breaking down a problem into more complex problems

The process of taking a problem and making it bigger

The process of breaking down multiple problems and combining them into one hugely complex problem

The process of breaking down a problem into smaller manageable parts

2. Decomposition helps us solve complex problems and manage ____________

our daily emotional life

large projects

the smallest of problems with only one tiny step

extremely simple small projects

3. The process of making breakfast can be 'decomposed' into:

Making breakfast

making toast and making tea that can both be further decomposed

Eating

4. Decomposition gives us an overview of the problem and how to tackle it, e.g. for making breakfast ….

the process of decomposition makes it obvious that the task is far too complex for even ten people to attempt

it is not possible to decompose the 'big problem' into smaller problems.

two people could make this breakfast at the same time, one could make tea and one could make toast.

only one person could make this breakfast and it would take a very long time to do so

5. Decomposing problems into their smaller parts is not unique to computing: it’s pretty standard in engineering, design and project management.

FALSE

TRUE

6. Why is decomposition useful in the creation of a tablet?
```A tablet can be broken down (decomposed) into smaller components.
With thanks to iFixit.com```

It is not useful

It highlights the whole problem as a single entity and creates a sense of urgency

It shows the immensity and difficulty of the single problem and encourages hard work

Different people can work on the different components and save time/test more accurately

7. Which statement is most accurate (in reference to the below quiz modular diagram)

A quiz can be decomposed into its parts to help the programmer work on each part in turn.

A quiz cannot be decomposed as it is not a problem in itself

A quiz is a problem that can be broken down into smaller problems, but this is not decomposition.

A quiz cannot be broken down as it a single thing, and this diagram is therefore inaccurate

8. Why is it useful to use decomposition when dealing with a large problem?

Easier to delegate and assign different people to work on different parts of the problem

smaller parts of a problem are easier to solve/tackle / understand than the larger problem

All of the above

Easier to debug and manage smaller modules/problems

9. Read the following excerpt on top down programming (decomposiiton) and see if you think it is TRUE or FALSE
```Top down programming
==================================
In top-down programming, a programmer takes a task and
then breaks it down into smaller tasks. They then take
They continue to do this until each sub-task is simple enough
to understand and program and, ideally, each sub-task performs
only one job. The sub-tasks are then programmed as self-contained
modules of code```

TRUE

FALSE

10. Read this excerpt on reusability of modules and decide whether it is true or false
```Decomposition and re-usability of modules
==================================
Splitting up a problem into modules improves a company's efficiency because
self-contained modules can be re-used. They can be put into a library of
modules. When a module is needed to, for example, display some values,
you don't need to get the programmers
to write and test a module for this again.
You just re-use a module from the library. Over time, this will save a
company a lot of time and money.```

TRUE

FALSE

11. Which of the following statements is an ADVANTAGE of decomposition?
```The advantages of decomposition
==================================
#1 >> Splitting up a problem into modules helps get the job done more
efficiently because modules of code can be worked on at the same time by different
programmers. In addition, it helps because easier modules can be given to less
experienced programmers while the harder ones can be given to more experienced ones.

#2 >> Splitting up a problem into modules helps program testing because it is easier to
debug lots of smaller self-contained modules than one big program.

#3 >> Splitting up a problem into modules helps program readability because it is easier
to follow what is going on in smaller modules than a big program.

#4 >> Splitting up a problem into modules improves a company's efficiency because self-
contained modules can be re-used. They can be put into a library of modules.
When a module is needed to, for example, display some values, you don't need
to get the programmers to write and test a module for this again. You just re-use
a module from the library. Over time, this will save a company a lot of time and money.

#5 >> Splitting up a problem into modules improves a Project Manager's ability to monitor the
progress of a program. Modules can be 'ticked off the list' as they are done and this
will demonstrate some progress. This is far harder for a Project Manager to do if
the program has not been split up into modules.

#6 >> Splitting up a problem into modules is good for future program maintenance.
If a program needs to be changed for any reason, it may be possible simply to
remove one module of code and replace it with another.```

All of the above

none of the above

#1 , #2 and #4

Just #1 and #3

12. In programming, one way of decomposing a task is to break it into…..

python programming code variables

modules (e.g. separate functions or suboutines)

binary sequences

Decomposition cannot be used in programming

13. How would you decompose the task of creating an app?

First know the answer to a series of smaller problems e.g. will it be android or iphone, what is the colour scheme, what language will you use?

By making the problem a single whole entity by using an overview diagram (to define a single task)

By finding other similar apps and copying their code

The task of building an app can simply not be decomposed.

14. Dealing with many different stages all at once is much more difficult than breaking a problem down into a number of smaller problems and solving each one, one at a time.

TRUE

FALSE

15. Which of these is an example of decomposition?

Watching a mechanic repair a bicycle

None of the above

Looking at different bicycles for similarities between them

Finding out how a bicycle works by looking in detail at the different parts that make up the bicycle