Program Design


Program Design

matlab



What is program design?

As programs tackle larger and more complex problems, they cannot normally be easily implemented by writing one big script. It needs to be broken down into simpler modules/fucnctions.

Program design refers to the process of:

  • Deciding how to break down a program into modules
  • Deciding what the modules should do
  • Deciding how the modules should interact

Top-down vs. Bottom-up design

There are two different methodologies to software design:

  • Top-down has the emphasis on planning and complete understanding of the whole system
  • Bottom-up has the emphasis on early coding

Top-down design

This is most commonly applied in procedural programming. It is also known as stepwise refinement. The basic idea is to:

  • Break down problem into simpler sub-problems - each will be addressed by a separate program module.
  • Break down each sub-problem into even simpler sub-problems.
  • Continue until all sub-problems can be easily implemented.

A good example of this is when designing a perfect number program…

The rest of this chapter will be completed soon


return  link
Written by Tobias Whetton