What are Computer Programs?

In this tutorial, You will come to know about program design in the computer. How to design computer programs? is a basic question that comes in your mind when you think of any problem and its solution.

If so then this tutorial is only for you. Along with the detailed explanation of "designing computer programs," you will also come to know the answers to the following questions:

How do you create a computer program?

How do you write a program design?

To know more stay tuned.


How to Design Computer Programs?

Designing a computer program is an important part of any program. Actually, it consists of a strategy that is going to be used to solve any problems with the help of the program.

Program design is the process with the help of which the programmer can write or create a program. It is a problem-solving activity. Remember one thing, All the programs transform input into output.

First, you take initial requirements that means you have to understand the problem in a better way that you are going to solve with the help of the program by designing it.

Then you have to gather the data related to the problem and analyze it deeply and think

How do you implement those data into coding to solve the problem?

The code that does the conversion of inputs of the program is called the logic of the program. The logic then acts on the data which is called the model.

Your program must convert the input of the program into a model and then the model into some output.

The 1-2-3 is a high-level program design patterns in Computer Science. This is the easiest programming pattern that you have learned on the very first day of programming earlier.

In 1-2-3 programming patterns, the programs ask the user to give some input and do something then finally print it as an output on the screen. For example "Hello World" program is a 1-2-3 pattern program.

REPL (Read Execute Print Loop) programming pattern is another programming pattern. Here, the programs go back after printing the output on the screen and again ask the user for input.


Steps involved in program design

  1. Problem Analysis
  2. Outlining
  3. Algorithm Development
  4. Control Structures

1. Problem Analysis

Firstly, we have to understand the problem that we are going to solve with the help of a program so that it becomes easier for us to go further. For this, we have the following things to do.

1. What type of data is going to be used in the program?

2. What type of output is required in the program that we are going to write?

3. What are the conditions under which the program works?


2. Outlining

When the above three things are done then the next step is to decide how to achieve the goal. Some languages follow a top-down approach to solve the given problem which is known as a structured language while others follow a bottom-up approach which is referred to as object-oriented programming language.

In a top-down approach, the process is decomposed into tasks that make a hierarchical structure. These tasks form the functions in the program. This is very helpful and easier to understand and maintain.


3. Algorithm Development

The next step is finding out the step-by-step procedure to solve the desired problem. This process is called Algorithm development because the step-by-step procedure is called the Algorithm. We can do the same by using Flowcharts in which we make use of symbols and shapes.


4. Control Structures

The procedure in which there is a large number of difficulties contains a large number of control statements to direct the flow of execution of the program.

Any algorithm can be structured by using the control structures like sequence, selection, and looping. Sequence structures in any algorithm describes the execution of statements in sequence one after another.

Selection structures have a solution on the basis of the conditions present in that algorithm and depending on which they have two or more branches.

Previous
Next Post »