Skip to main content

Problem Solving Using Computer

Before writing a computer program, we must be clear about the processing steps to be performed by the computer. Hence, in order to ensure that the program/instructions are appropriate for the problem and are in the correct sequence, program must be planned before they are written. The problem solving contains a number of steps which are as below.

   Steps in problem solving by Computer


1)      Problem Analysis:
                Before solving a problem, it should be analyzed well. It is impossible to solve a problem by using computer without clear understanding & identification of the problem. Thus, problem analysis contains different activities like determining input/output, software and hardware requirement, time constraints, different types of users, accuracy etc. 

2)      Algorithm Development:
                Algorithm is step by step description of the method to solve a problem. In other words, it can be defined as a sequence of instructions designed in such a way that if the instructions are executed in the specified sequence, the desired result is obtained.
 Example: write an algorithm to solve the problem which tests a number for even or odd.

Step1: Start
Step2: Read a number.
Step3: Divide the number by 2 and check the remainder.
Step4: If the remainder in step 3 is zero,
              Display the number as even otherwise as odd.
Step5: Stop.

3)      Flowchart:
Flowchart is the graphical representation of the algorithm using standard symbols. In other words, flowchart is a pictorial representation an algorithm that uses boxes of different shapes to denote different types of instruction. The actual instructions are written within these boxes using clear statement. The boxes are connected by solid lines having arrow marks to indicate the flow of operation.
      Flowchart  Symbols 
  
Example of flow chart:
       Draw flowchart to solve the problem which tests the number for even or odd.      
             

4)      Coding:
             This is the process of transforming the program logic design into a computer language format. This stage translates the program design into computer instructions. These instructions are the actual program or software product. It can be said that coding is the act of transforming operations in each box of the flowchart in terms of the statement of the programming.

5)      Compilation and Execution:
                      The process of changing high level language into machine level language is known as compilation. It is done by a compiler. Once the compilation is completed then the program is linked, loaded and finally executed. The original high level language is called the source program and the resulting machine language program is called object program.

6)      Debugging & Testing:
              Debugging is the discovery and correction of programming errors. Even after taking full care in program design, some errors may remain in the program because the designer might have never thought about a particular case. These errors are detected only when we start executing the program in a computer. Such types of program errors are called BUGS and process of removing these BUGS is knows as debugging.
                Testing is the validation of the program. Testing ensures that program performs correctly the required tasks. The program testing and debugging are closely related.

7)      Program Documentation:

               Documentation of program helps to those who use, maintain and extend the program in future. Properly documented program is useful and efficient in debugging, testing, maintenance and redesign process. A properly documented program can easily be used again when needed and an undocumented program usually requires much extra work. Among the techniques commonly found in documentation are flowcharts, comments, memory maps, and parameter & definition list.

Comments

Popular posts from this blog

Object Oriented Programming

Object Oriented Programming Programming paradigm that represents the concept of "objects" that have data fields (attributes that describe the object) and associated procedures known as methods Programming methodology based on objects, instead of just functions and procedures Focuses on data rather than process As individual objects can be modified without affecting other aspects of the program, it is easier for programmers to structure and organize software programs Easier to update and change programs written in object-oriented languages Simula was the first object oriented programming language Eg: C++, Java, etc. Features of OOPS Objects Referred as instance of class Basic run-time entities in an object-oriented system a person, a place, a bank account, a table of data, etc can be an object They occupy space in memory that keeps its state  Each object contains data and code to manipulate the data  Classes Blue print or prototype  which defi

2. Star Network topology

In star topology all devices or computers are connected to one centralized server. They are connected with server by hub.  Star topology is used in that network where end points are directly reachable from central location. Because each nodes link to the server by different cables. There is no risk of data collisions. Each computer connected to the hub by its own cable segments only a single computer can transmit at a time and every computer on the network wait for message. Thus it is best on broadcasting architecture. a.      Advantages i.                     Devices are attached to server by its own cable, thus break down of cable affects only to that nodes. ii.                   Failure of single node will not affect the rest of the network. iii.                 Central hub can be represent with other having more ports to plugs the nodes. b.      Disadvantages i.                     Failure of central hub will affect whole network. ii.                   More expens