Unit-5 Principles of Programming .pptx

hussainshoaib1102 21 views 9 slides Aug 09, 2024
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

Computer


Slide Content

Programming languages There are two main categories of programming languages : 1. Low-level languages . 2. High- Level languages .

Program Development   refers to the process of creating software, and it is categorized into the following stages: Problem recognition - Here, the programmer should understand and interpret the problem. Problem definition - The programmer identifies the required input, processing activities, and output. The programmer also identifies ways of solving the same problem and picks the best. Written documentation is required for the design stage. Program Design - At this stage, the programmer develops a problem-solving project called an algorithm, a limited number of logical steps that a program follows to solve a problem. At this stage, tools such as pseudocodes , flowcharts, and decision tables are helpful. Program Coding - The algorithm gets translated into an equal programming language code. In program coding, the programmer may use different control structures.

Program control structures Sequence control Here, the computer reads instructions from a program file from the first statement to the last. Below is an example of Sequence control structures in pseudo-code form:

Its Syntax is:

Selection control structures A statement is executed if the condition returns true or false. The condition must be a Boolean expression. There are different types of selection control structures. For example:

if Else

Looping control structures These control structures get designed to execute the same block of code repeatedly until a condition is met. There are different types of looping control structures. For example:

Program testing and debugging Testing ensures that the program runs as intended and performs the intended actions. Debugging is the process of checking, detecting, and correcting errors in computer programs. Errors that may occur in a program are syntax errors and logic errors. Program implementations Program implementations It is the actual delivery and installation of the new program and how well it works. Program review and maintenance Review and maintenance are essential because of the errors encountered after implementation. Proper training of users will reduce the chance of invalid input that can crash the program.
Tags