Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Ch 12

A Computer program: is series of instructions that tells a computer how to carry


out processing tasks.‫البرنامج هو مجموعه من التعليمات التي نرسلها للكمبيوتر ليقوم بعمل معين‬
These programs form the software.
When a computer “runs” software, it performs the instructions to carry out a
task.
Computer programming is the craft of writing useful, maintainable, and
extensible source code which can be interpreted or compiled by a computing
system to perform a meaningful task. ‫حرفه كتابه كود يكون مفيد و قابل للتعديل و التطوير‬
Programming a computer can be performed in one of numerous languages,
ranging from a higher-level language to writing directly in low-level machine code.
Computer programs are developed by computer programmers or software
engineers.
Computer programmers mainly focus on coding computer Programs.
software engineers tend to focus on designing and testing activities.
Computer programming involves a broad set of activities that include planning,
coding, testing, and documenting.
Software engineering is a development process that uses mathematical,
engineering, and management techniques to reduce the cost and complexity of a
computer program while increasing its reliability and modifiability.
------------------------------------------------------------------------------------------------------------
A programming language is a set of keywords and grammar rules designed for
creating instructions that a computer can process or carry out.
Computer programs can be compiled or interpreted.
A keyword, or command, is a word with a predefined meaning for the compiler
or interpreter.
an instruction for a computer program consists of keywords and parameters.

1
Mr.Mind 01021476983
Keywords and parameters are combined with punctuation according to a series of
rules called Syntax.
Programming Languages Classes:‫التصنيفات‬
1-Low-level Languages
It includes commands specific to a particular CPU or microprocessor.
Ex: machine language and assembly language
2- High-level Languages
It uses command words and grammar based on human languages to provide what
computer scientists.
Ex: BASIC, Java, Ada, and C++
A single high-level command does the work of multiple low level commands.
Programming Languages Generations:
1st Generation
Machine languages were the first languages available for programming
computers.
A machine language is specific to a particular CPU or microprocessor family.
2nd Generation
An assembly language allows programmers to use abbreviated command words,
called op codes, such as LDA for load, rather than the 1s and 0s used in machine
languages.
It is machine specific
3rd Generation
It used easy-to-remember command words, such as PRINT and INPUT, to take the
place of several lines of assembly language op codes or lengthy strings of machine
language 0s and 1s.
Ex: COBOL, Fortran, Pascal ,BASIC, C and C++, Objective-C, java.

2
Mr.Mind 01021476983
4th Generation
It used more closely resemble human languages, or natural languages, than do
third-generation languages.
It eliminates many of the strict punctuation and grammar rules that complicate
third-generation languages.
Ex: SQL and RPG.
A single command written in a fourth-generation language can replace many lines
of third generation code.
5th Generation
It allow programmers to use graphical or visual tools to construct programs
instead of typing lines of code.
Programming paradigm refers to a way of conceptualizing and structuring the
tasks a computer performs.‫الطريقه التي يبدأ بها المبرمج هيكله و بناء التاسك للكمبيوتر‬
Is a style of programming ‫التعريف بشكل مختصر‬
Some programming languages support a single paradigm. Other programming
languages-referred to as multi-paradigm languages-support more than one
paradigm.
Paradigm Languages
Event-driven Visual Basic, C#
Procedural C, BASIC, Pascal, COBOL, Fortran, Ada
Object oriented Smalltalk, C++, Java, Scratch
Declarative Prolog

Program Development Life Cycle (PDLC):


is a process that ensures good software is built.
Step 1: Analyze the problem
define the problem to be solved, and write program specifications – descriptions
of the program’s inputs, processing, outputs, and user interface.

3
Mr.Mind 01021476983
Step 2: Design the program
Develop a detailed logic plan using a tool such as pseudocode, flowcharts, object
structure diagrams.
Step 3: Code the program
Translate the design into an application using a programming language or
application development tool by creating the user interface and writing code;
include internal documentation – comments and remarks within the code that
explain the purpose of code statements.
Step 4: Test and debug the program
Test the program, finding and correcting errors (debugging) until it is error free.
Step 5: Formalize the solution
Review and revise internal documentation; formalize and complete end-user
(external) documentation.
Step 6: Maintain the program
Provide training and support to end users; correct any unanticipated errors that
emerge and identify user-requested modifications.

an algorithm is a set of steps for carrying out a task that can be written down and
implemented.
algorithm for a computer program is a set of steps that explains how to begin
with known information specified in a problem statement and how to manipulate
that information to arrive at a solution.
Algorithms are usually written in a format that is not specific to a particular
programming language.
The most well-known methods used to write an algorithm are: structured English,
pseudocode, and flowcharts.
Structured English is a subset of the English language with a limited selection of
sentence structures that reflect processing activities.
4
Mr.Mind 01021476983
Pseudocode is a notational system for algorithms that has been described as a
mixture of English and your favorite programming language.
Flowchart is a graphical representation of the way a computer should progress
from one instruction to the next when it performs a task.

Programmers can use a text editor, program editor, or VDE to code computer
programs.
A text editor is any word processor that can be used for basic text editing tasks.
A program editor is a type of text editor specially designed for entering code for
computer programs.
A VDE (visual development environment) provides programmers with tools to
build substantial sections of a program by pointing and clicking rather than typing
lines of code.
Testing often consists of running the program and entering test data to see
whether the program produces correct results.
If testing does not produce the expected results, the program contains an error,
sometimes called a bug.

5
Mr.Mind 01021476983
Syntax errors occurs when an instruction does not
follow the syntax rules, or grammar

Runtime errors occurs when a program runs Ex:


Division by zero

Logic errors error in the logic or design of a


program Ex: using wrong formula to
calculate the area

Programmers can locate errors in a program by reading through lines of code,


much like a proofreader.
They can also use a tool called a debugger to step through a program and monitor
the status of variables, input, and output.
An SDK (software development kit) is a collection of language-specific
programming tools that enables a programmer to develop applications for a
specific computer platform, such as Windows PCs.
A basic SDK includes a compiler, documentation about the language and syntax,
and installation instructions.
More sophisticated SDKs might also include an editor, a debugger, a visual user
interface design module, and APIs.
An IDE (integrated development environment) is a type of SDK that packages a
set of development tools into a smooth programming application.
The modules in the application—editor, compiler, debugger, and user interface
development tool—have a uniform set of menus and controls, which simplifies
the programming process.

6
Mr.Mind 01021476983

You might also like