Premium Essay

Pta Nhi

In:

Submitted By raja2943
Words 3284
Pages 14
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Ref Page

Chapter 11: Planning the Computer Program

Slide 1/44

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Learning Objectives
In this chapter you will learn about:
§ Programs must be planned before they are written
§ Algorithm
§ Flowchart
§ Pseudocode
§ Plan the logic of a computer program
§ Commonly used tools for program planning and their use

Ref Page 183

Chapter 11: Planning the Computer Program

Slide 2/44

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Purpose of Program Planning
§ To write a correct program, a programmer must write each and every instruction in the correct sequence
§ Logic (instruction sequence) of a program can be very complex § Hence, programs must be planned before they are written to ensure program instructions are:
§ Appropriate for the problem
§ In the correct sequence

Ref Page 183

Chapter 11: Planning the Computer Program

Slide 3/44

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Algorithm
§

Refers to the logic of a program and a step-by-step description of how to arrive at the solution of a given problem §

In order to qualify as an algorithm, a sequence of instructions must have following characteristics:
§ Each and every instruction should be precise and unambiguous § Each instruction should be such that it can be performed in a finite time
§ One or more instructions should not be repeated infinitely.
This ensures that the algorithm will ultimately terminate
§ After performing the instructions, that is after the algorithm terminates, the desired results must be