Planning the Computer Program:
Concept of Problem Solving:
In Computer programming, problem solving is a systematic approach to find & implement a solution to a problem.
Problem solving is an act of defining a problem, determining the cause of the problem; identifying , prioritizing & selecting alternatives for a solution & implementing a solution
Program :
A set of instructions to solve the problem or the specification of the sequence of
computational steps in a particular programming language is called program. The task of developing a program is called programming.
Steps involved in Problem Solving:
There are a series of phases included in problem solving, starting from defining a problem, analyzing that problem, designing & planning the procedure to be followed, coding of the actual program, testing the created program and maintaining the program.
Step 1 - Defining the Problem:
In this step, a programmer has to define the task precisely and check for completeness. The defined problem should not be ambiguous or imprecise.
Task in defining a problem:
Specifying the input requirements
Specifying the output requirements
Specifying the processing requirements.
Step 2 - Analyzing the Problem:
When the programmer defines a problem,a proper analysis of that problem is required which helps in designing and coding for the solution of that particular problem.
In this phase, the programmer has to declare the computational strategies to analyze the defined problem with the help of available resources.
Programming techniques such as sequence, selection, iteration can be used to develop the logic for the analysis with the help of searching, Sorting, inserting & merging. Different procedures such as arithmetic, logical and relational operations are followed to analyze the problem.
Step 3 - Designing a Program:
After defining & analyzing the problem, you need to design a solution for the problem. There are several design methodologies that can be applied.
An important approach is the Top- Down design approach. In this approach, the problem is divided into a hierarchical structure of modules.A separate sub-program may be designed for each module.This allows a programmer to build a solution in a step-by-step manner.
An algorithm and flowchart is a good example of a top down design approach.Here you must develop the logic by using algorithms and flowcharts
Step 4 - Coding :
In the coding phase, a programmer needs to write a program for the problem.An algorithm expressed in programming language is called program and writing a program is called coding. The logic that has been developed in the algorithm is used to write the program.
Step 5 - Debugging and Testing:
Debugging -
Identifying & removing errors from a program or software is called debugging. Debugging checks, detects & corrects errors or bugs to allow proper program operation according to set specifications. Debugging is also known as debug. The debugging process starts as soon as code is written and is done by programmer
Testing -
The program created should be tested on various parameters. The program should meet the requirements of the user. It must respond within the expected time. It should generate correct output for all possible inputs.
There are different testing methods available like unit testing, integration testing, system testing, and acceptance testing to ensure that the software meets all the business and technical requirements and works as expected.
Step 6 - Maintaining the Program:
In this phase you either improve the logic of the program or correct the errors that arise during the execution of the program. Improvement in the program requires proper documentation of the program.
Documentation :
From the start of the problem solving to the end of the implementation of the program, all the tasks should be documented i.e. kept for future reference. It is also an important part of the problem solving or program development.
Documentation may be of two types:
a. Technical Documentation known as programmer's documentation which includes the problem analysis to implementation details for that program. It is needed for future reference for any modification, update of the program.
b. User manual is the documentation prepared for the end-user of the program that guides the user how to operate the program.
No comments:
Post a Comment