Programming Concepts 01

12

Click here to load reader

Transcript of Programming Concepts 01

Page 1: Programming Concepts 01

   

Fady Mohammed Osman

Mail: [email protected]

Programming concepts

Page 2: Programming Concepts 01

   

Programming concepts

What is a computer program?? Program structure. Variables declaration. Comparision Operators. Flow control. Iterative statements (loops). Functions. Event­driven or non Event­driven. Generic or special­purpose.

Page 3: Programming Concepts 01

   

What is computer program?

Computer program is collections of instructions that tell a computer how to interact with the user interact with the computer hardware and process data.

Page 4: Programming Concepts 01

   

Program structure

Statements to establish the start of the program . Variable declaration. Program statements.

Page 5: Programming Concepts 01

   

Variables

Variables are places for holding data in memory.

Types of variables: Integer. Real(float). Characters. Strings.

Page 6: Programming Concepts 01

   

Comparision and logical operators

Comaparision (equal ,greater than,less than,not equal).

Logical (and,or,not).

Page 7: Programming Concepts 01

   

Control flow

If (condition). (statements). Else. (statements).

Page 8: Programming Concepts 01

   

Iterative statements

Used to repeate a section of code for certain amount of times.

Page 9: Programming Concepts 01

   

Functions

simply contain a series of computational steps to be carried out. Any given procedure might be called at any point during a program's execution, including by other procedures or itself.

Page 10: Programming Concepts 01

   

Event­driven and non event­driven

What is the difference?? Examples of events: Program load. mouse click. Key press. Program end.

Page 11: Programming Concepts 01

   

Generic or special purpose??

Generic or general purpose programming language.

Special purpose:

 ­SQL.

 ­Markup languages (HTML,XML).

Page 12: Programming Concepts 01

   

Useful sites

Programming concepts:➢ http://cisnet.baruch.cuny.edu/holowczak/classes/

programming/ Language categories:➢ http://en.citizendium.org/wiki/Programming_langu

age Programming language comparison:➢ http://en.wikipedia.org/wiki/Comparison_of_progr

amming_languages