Functional decomposition is a method used to design a detailed structure of components or modules of the software. Functional decomposition specifies the functions, activities, processes or actions that the component or module of the software has to perform. You can better understand the concept of functional decomposition with the help of an example. So in this context, we will be discussing the steps or process of functional decomposition along with an example.
Content: Functional Decomposition
Functional Decomposition Process
Functional decomposition is a standard technique to design any software. It is a top-down method as it keeps refining the functions of the software. Let us discuss the functional decomposition process step by step.
1. Identify the General Function
Before you start to design software, you must be very clear about what task your software, system, device, process or component must do? The answer to this question must be a single sentence.
If you are coming up with more than one sentence then it means that you must be considering some sub-functions. We need to think in a generalized way that what is the overall purpose of designing this software.
Once you find the one-sentence answer to the question, what is the most general task that your software has to perform then start designing the functional decomposition diagram for the same? In the functional decomposition diagram, the most general task of your software must be at the top and it must only be a short description of what the task is not how the task has to be performed.
2. Identify Set of Sub-Functions
To identify the set of sub-functions to the most general function ask yourself what are the tasks or functions that you must do just immediately before the most general function.
The list of these sub-functions should be placed just below the most general function in the functional decomposition diagram. Connect the sub-functions with the general function using lines.
Remember: Describe only what the function must do not how it must do it.
3. Identify Next Level Sub-Function
Now, whatever sub-functions you have identified in step 2 you have to refine each of them. You have to identify their closet sub-functions. You have to keep refining the functions until the functions in your functional decomposition diagram cannot break down further. Keep attaching the closet subfunction to its parent function by using lines.
4. Check the FDD
Once you have completed making the functional decomposition diagram FDD, examine the diagram carefully. Assure that you have not left any function that can be included in the diagram.
Functional Decomposition Example
Suppose that you have to design software that can be used by the patients to make an appointment with the doctor. So, if we perform the functional decomposition here, then we have to first write down the objective of the software in English, in a single statement.
make an appointment to the doctor
Our next move is to think about the sequence of steps a person must go through to make an appointment.
register yourself search for doctor manage the appointment timing book appointment treatment record payment wait for doctor
Our next step will be to break down, refine or elaborate each of these statements into more detail. Well, we have to continue this process until we have reached a solution.
Now to refine or elaborate the first statement i.e. ‘register yourself’ we have again expressed the sequence of steps that are required to achieve the solution for this statement.
register yourself open the app if new customer then enter the details and create Id and password else enter email-id and password to login
In this way, you can keep on elaborating the task till you reach the final solution.
Cohesion & Coupling
We had a discussion about cohesion and coupling earlier in the content modularity in software engineering also. As we decompose a function into several sub-functions we must take care that there is little coupling between the functions and strong cohesion within the function.
- Weak coupling corresponds to less dependency between two functions of a software. Weak coupling is good as if there occurs an error in a function, correcting an error of that function would not put an impact on other functions.
- Strong coupling corresponds to the association of processes or activities within a function that lets the function or module perform a single task. The highly cohesive function tend to perform a single task which makes it simple to understand.
Benefits of Functional Decomposition
- The functional decomposition helps the developers to break down a system into sub-functions which makes it easier to analyze.
- It helps in minimizing the error as it becomes easy to analyze a specific function.
- It also helps in specifying the precise requirement and features of the functions and sub-functions
Key Takeaways
- Functional decomposition breaks down the complex software into sub-functions which helps in analyzing the overall functioning of the software.
- FDD beings by identifying the most general task that your software has to perform.
- The most general task of the software must be a single sentence and its description must be what the task is and not how to do the task.
- We proceed further by identifying the other tasks that are done just immediately before the general task.
- Go on refining the tasks or function until they can’t be refined further.
- The functions and sub-functions that you identify while performing the decomposing a system must have weak coupling between the functions and strong cohesion within the function.
So, this is all about functional decomposition. We have seen how a large scale system or complex software can be decomposed into functions that are easy to understand.
Leave a Reply