Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Programming.

Similar presentations


Presentation on theme: "Computer Programming."— Presentation transcript:

1 Computer Programming

2 Objectives Program and Programming Algorithms & Programs
Software Life Cycle Computer Language Generations Flowchart

3 Program and Programming

4 Program and Programming
A set of instruction written in a programming language that a computer can execute so that the machine acts in a predetermined way. Program solves a problem البرنامج يحل مشكلة معينة Before writing a program: Have a thorough understanding of the problem Carefully plan an approach for solving it. Programming:البرمجة هي عملية كتابة أوامر للحاسب تخبر المعالج بما يجب أن يقوم به The Process of providing instructions to the computer that tells the processor what to do.

5 Algorithms and Programs

6 Algorithms and Programs الخوارزمي يقدم حلا لمشكلة دون الاعتماد على أي لغة للبرمجة بينما البرنامج عبارة عن خوارزمي مكتوب بلغة معينة An Algorithm is a solution to a problem that is independent of any programming language While A program is an algorithm expressed using a specific set of instructions from any programming language.

7 Algorithm Example Maximum of two numbers Steps:
Read/input two numbers Compare two numbers Print the Greater number Average of three numbers Read/input three numbers Add three numbers divide the sum by 3. Print the result of divison

8 Software Life Cycle

9 Software Life Cycle What Requirements Gathering, Problem definition
How Analysis and Design (Programming techniques) Do it Coding Test Testing Use Implementation and Maintenance

10 Computer Language Generations

11 Computer Language generations
Machine language لغة الآلة Assembly languages لغة التجميع High-level languages لغة المستوى العالي Very high-level languages لغة المستوى العالي جدا Natural languages اللغات الطبيعية

12 Machine Language Programs and memory locations are written in strings of 0s and 1sأصفار وآحاد Problems with machine languages Programs are difficult to write and debug Each computer has its own machine language Only option available to early programmersكانت تستخدم في برمجة حاسبات الجيل الأول

13 Assembly Languages تستخدم حروف بدلا من الصفر والواحد مثل: For example, A for add, C for compare, etc. Use names rather than binary addresses for memory locations Require an assembler to translate the program into machine language تحتاج لبرنامج يسمي المجمع للترجمة Still used for programming chips and writing utility programs مازالت تستخدم لبرمجة الشرائح

14 High-Level Languages Transformed programming
Programmers could focus on solving problems rather than manipulating hardware Programs could be written and debugged much more quickly Requires a compiler to convert the statements into machine language Each computer has its own version of a compiler for each language.

15 Very High-Level Languages
Also called fourth-generation languages (4GLs) Considered nonprocedural languages The programmer specifies the desired results, and the language develops the solution Programmers can be about 10 times more productive using a fourth-generation language than a third-generation language

16 Natural Languages Resemble written or spoken English
Programs can be written in a natural syntax, rather than in the syntax rules of a programming language The language translates the instructions into code the computer can execute

17 Major Programming Languages
FORTRAN COBOL BASIC RPG Visual Basic C Java

18 Object-Oriented Languages
Java C# Visual Basic

19 Flowchart

20 Flowchartخريطة سير العمليات
Graphical representation of an algorithm Components: Arrows/lines: Flow of control Parallelogram: Indicates input and output operations Rectangle symbol (action symbol): Indicates any type of action/computational step Oval symbol: Indicates the start or the end of a program or a section of code Diamond: Decision.

21 Flowchart Notations Arrows Diamond Parallelogram Oval Rectangle

22 Example: Add two Numbers
START READ A,B Sum = A+B PRINT Sum Stop


Download ppt "Computer Programming."

Similar presentations


Ads by Google