Sunday, April 24, 2011

Problem Solving



.


The most difficult part of solving a problem on a computer is discovering the method of solution. Once you have got a proper solution you could easily convert this into a programming language.
It is therefore helpful to temporarily ignore the programming language and Concentrate on formulating the steps of the solution and design them down in a algorithm.



That algorithm may be in
 Flow chart Or Pseudo code

A sequence of instructions expressed in this way is frequently referred to as an algorithm.
Writing a computer program involves performing the following tasks.


1. Understanding the problem
2. Developing an Algorithm for the problem
3. Writing a Computer Program
4. Testing the Computer program


STEP 1 – Understand  the problem


How do you solve that problem ? The first task is to understand what the problem is clearly.

 Find out the inputs ? Here the input should be two numbers.
Find the output be ? Total. So there must be some calculation that has to be done. That is Process.



STEP 2 – Developing an Algorithm for the problem


With the knowledge you have, you can write a Flow chart solution to the above problem.



STEP 3 – Writing the Computer Program in Visual Basic


Next you go to Visual Basic &  start thinking about suitable variable names, data types etc at this stage. Without much difficulty you should be now able to convert the Flow Chart into Visual Basic Coding.




STEP 4 – Testing your computer Program

This step means the Checking the accuracy of the program. Here program runs & produces the results. In case of any errors, you should remove  them (that is Debugging).


.

No comments:

Post a Comment