Problems can be solved a variety of ways and computers are a great tool to solve problems. They take input and process it faster than humans can and produce output for users or store it for later use.
ToP-DOWN DESIGN is the breaking down of a computer system into a set of sub-systems, then breaking each sub-system down into a set of smaller sub-systems, until each sub-system just performs a single action. This is an effective way of designing a computer system to provide a solution to a problem, since each part of the problem is broken down into smaller more manageable problems. The process of breaking down into smaller sub-systems is called 'stepwise refinement'. This structured approach works for the development of both large and small computer systems. When large computer systems arc being developed this means that several programmers can work independently to develop and test different sub-systems for the same system at the same time. This reduces the development and testing time.
In order to show top-down design in a diagrammatic form, structure diagrams can be used. The STRUCTURE DIAGRAM shows the design of a computer system in a hierarchical way, with each level giving a more detailed breakdown of the system into sub-systems.
Consider the alarm app computer system for a smart phone. This could be divided into three sub-systems, setting the alarm, checking for the alarm time, sounding the alarm. These sub-systems could then be further sub-divided; the structure diagram makes the process clearer.
Taken from Cambridge IGCSE Computer Science
first identifies the small chunks of the problem and solves it moving its way to the top while the top down approach divides the bigger problem into smaller parts and solves it. Starts at the bottom then works its way up to the target.
Unlike the topdown which looks at the bigger picture and works its way down refining it's steps as it goes along.
Stages in the problem solving process
Problem definition
Problem analysis (including functional and non-functional requirements)
Functional requirements are associated with specific functions, tasks or behaviours the system must support, while non-functional requirements are constraints on various attributes of these functions or tasks.
(https://theappsolutions.com/blog/development/functional-vs-non-functional-requirements for more reading)
Identify and evaluate possible solutions
Select and justify the optimal solutions ( create algorithms and test plans)
Implementation and review.
Gives a solution to the problem
Clearly defined and unambiguous steps
Finite number of steps
Flow of control from one process to another
Narrative - Instructions or directions on how to solve the problem in a paragraph form not necessarily steps.
Flowchart - a diagrammatical way of representing an algorithm it shows the flow of data from one process to another
Pseudocode - steps in solving a problem where each step completes a task and is written resembling a programming language but does not follow the synatx of the language.
Enter, Read / Readln or Input Print, Write / Writeln, display, output
= , <--
Sequencing - execution take place line by line
Selection - conditional branching If then Else
Repetition - looping repeating statements till a condition is met (for, while, repeat until). Iteration is one go through the loop .