Problem Solving Overview

A "program" is defined as an organized set of procedures for solving a problem, including: the collection of data, processing, and presentation of results. A "computer program" is one that is represented in a language that can be interpreted by a computer. Thus, there are two key considerations in programming a computer. One is to properly define the procedure. The other is to record it in a language that the machine can recognize. This dual nature delineates a prominent separation of duties for a computer programmer. The computer industry refers to the first of these duties as "analysis". The act of analysis involves the recognition and definition of the problem to be solved and then a carefully documented process of problem solution. Even someone capable of using a computer language could not write an effective program without a proper analysis of the task to be performed. For this reason, analysis is considered to be the foundation upon which programming is based. Analysis is a logical process dependent on good problem solving technique and should be completely independent of physical hardware. This insures that a program solution is not based primarily upon hardware and instead concentrates solely on the problem.

The second duty of a programmer is one of representation using language. One of the end products of an analysis is something called an "algorithm", which describes the procedures necessary to solve a problem or to perform a task. It can be thought of as similar to a cooking recipe. As you might expect, algorithms are normally written on paper in languages such as English or French which are familiar to the people performing the analysis. Sometimes algorithms are drawn as flowcharts (graphic diagrams) showing the flow of control from one step to the next. Unfortunately, computers do not represent information in our normal human languages, so it was necessary to develop programs that could translate algorithms into the binary language which computers use to represent instructions. However, this proved to be a very difficult task because of the complexities of human languages. These languages were far larger than necessary, and contained too many irregularities and exceptions to their own rules of "syntax" (grammar and structure). Thus the industry developed special computer programming languages with rigid rules of structure and limited vocabularies. Each language was specifically designed to suit the needs of a particular type of program. Some were developed for easy performance of scientific calculations. Others were designed to meet the unique needs of the business community. Still others were made for graphic purposes such as drafting. Now, programmers can record their procedures using easily remembered limited vocabularies of well chosen words such as: READ, WRITE, etc. The task performed by the translating programs is made much simpler, since the languages they are translating now follow well defined rules of logical structure. For most people, a computer programming language is far easier to learn than any spoken human language because its vocabulary is so small and its rules of grammar are so consistent.

It is a common mistake for students of computer programming to focus on learning programming languages rather than the more important topic of analysis. Once good problem solving technique has been learned, students will find that learning programming languages is quite easy. But without solid analytical skills, no amount of language literacy will produce an effective program.

The outline below shows the basic approach taken to develop a computer program. The dividing line between steps IV and V delineates where the logical work of analysis stops and the physical computer work of programming begins.



   I. Define the problem or task (WHY) and
      divide into modules if necessary.
  II. Define the data (WHAT).
      A. Define the Output (WANTS).
         1. Hardcopy (on paper).
         2. Softcopy (on the screen)
      B. Define the Input (INVESTMENT).
 III. Define the Algorithm (HOW).
  IV. Check the Algorithm (HUMILITY).


   V. Code the Algorithm into a Computer Language (TRANSLATE).
  VI. Debug the Code (IMPLEMENT).

While performing each of the activities listed above, analysts and programmers create documents to record their thoughts and provide a consistent framework for future development. Although students often feel that the development of these documents is tedious, they ultimately discover the tremendous importance of such documentation and gradually learn that they are essential in software development. The table below lists the primary documents created during each of the software development activities. Each of these documents will be introduced as they are needed during the course, although some will not be discussed until later chapters. This site provides a variety of examples of both analysis (problem solving and documentation) and programming (coding solutions into computer languages). To view them, click the menu item labeled "Examples" in the panel on the left of your screen.

 I. Define the problem or task (WHY) and.
    divide into modules if necessary. (Not covered until Chapter 3)
Problem Statement
Structure Diagram (Chap.3 and later)
II. Define the data (WHAT). Symbolic Constant Lists
Variable Lists
Parameter Lists
    1. Define the Output (WANTS).
        a. Hardcopy (on paper).
        b. Softcopy (on the screen).
Sample(s) of Outputs:
Sample Softcopy
Sample Hardcopy
    2. Define the Input (INVESTMENT). (Expansion of Lists shown above)
III. Define the Algorithm (HOW). Either: Outline, Pseudo-code,
or Flowchart
IV. Desk Check the Algorithm (HUMILITY). Memory Tracing Chart
Simulated (Test) Outputs:
Test Softcopy & Test Hardcopy
 V. Code the Algorithm into a Computer Language (TRANSLATE). Prog. Language Source Code
VI. Debug the Code (IMPLEMENT). Test Run Outputs

PATH: Instructional Server> COP 2000>