Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Programming. Objectives Program and Programming Program and Programming Algorithms & Programs Algorithms & Programs Software Life Cycle Software.

Similar presentations


Presentation on theme: "Computer Programming. Objectives Program and Programming Program and Programming Algorithms & Programs Algorithms & Programs Software Life Cycle Software."— Presentation transcript:

1 Computer Programming

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

3 Program and Programming

4 Program and Programming Program: مجموعة من الأوامر المكتوبة بلغة برمجة يقوم الحاسب بتنفيذها 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. 4

5 AlgorithmsandPrograms

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. 6

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

8 Software Life Cycle

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

10 Computer Language Generations

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

12 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 Programs are difficult to write and debug Each computer has its own machine language Each computer has its own machine language Only option available to early programmersكانت تستخدم في برمجة حاسبات الجيل الأول

13 13 Assembly Languages تستخدم حروف بدلا من الصفر والواحد مثل: For example, A for add, C for compare, etc. For example, A for add, C for compare, etc. Use names rather than binary addresses for memory locations 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 14 High-Level Languages Transformed programming Programmers could focus on solving problems rather than manipulating hardware Programmers could focus on solving problems rather than manipulating hardware Programs could be written and debugged much more quickly 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. Each computer has its own version of a compiler for each language.

15 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 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 Programmers can be about 10 times more productive using a fourth-generation language than a third-generation language

16 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 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 17 Major Programming Languages FORTRAN COBOL BASIC RPG Visual Basic Visual Basic C Java

18 18 Object-Oriented Languages C++ Java C# Visual Basic Visual Basic


Download ppt "Computer Programming. Objectives Program and Programming Program and Programming Algorithms & Programs Algorithms & Programs Software Life Cycle Software."

Similar presentations


Ads by Google