Top Banner
1 12/4/1435 h Lecture 2 Lecture 2 Programs and Programs and Programming Languages Programming Languages
14

1 12/4/1435 h Lecture 2 Programs and Programming Languages.

Jan 17, 2016

Download

Documents

Bridget Austin
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

1

12/4/1435 h

Lecture 2Lecture 2

Programs and Programming Programs and Programming LanguagesLanguages

Page 2: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

2

Q:Mention the Categories of Software?1.1. System software System software 2.2. Application softwareApplication softwareQ: What is A system software?Q: What is A system software?

They are programs that They are programs that managemanage the the computer hardware and the programs that computer hardware and the programs that run on them. run on them. ExamplesExamples: operating : operating systems, utility programs, software systems, utility programs, software development toolsdevelopment tools

Page 3: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

3

Q: What is Application software?

1.1. They are programs that provide services to They are programs that provide services to the user. Examples : word processing, the user. Examples : word processing, games, programs to solve specific games, programs to solve specific problemsproblems

Page 4: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

4

.QQ: : Define a program?Define a program?

A program is a set of A program is a set of instructions that the instructions that the computer follows to perform computer follows to perform a taska task

Page 5: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

5

Q: What is a Program Made of ?Q :What areQ :What are Common Common

elements in programming elements in programming languages ? :languages ? :

1.1. Key Words Key Words 2.2. Programmer-Defined IdentifiersProgrammer-Defined Identifiers3.3. OperatorsOperators4.4. Punctuation Punctuation 5.5. Syntax Syntax

Page 6: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

6

Q:Define The Followings 1.1. Key Words:Key Words: Also known as Also known as reserved wordsreserved words Have a special meaning in C+Have a special meaning in C+

+.+. Can not be used for any other Can not be used for any other

purposepurpose

Page 7: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

7

.

Examples of key words are : Examples of key words are :

using, namespace, int, double using, namespace, int, double and returnand return

Page 8: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

8

Key Words

Page 9: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

9

2. The Programmer-Defined Identifiers

Names made up by the Names made up by the programmerprogrammer

Not part of the C++ languageNot part of the C++ language Used to represent various Used to represent various

things things ex: ex: variables (memory variables (memory locations functions …...locations functions …...

Page 10: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

10

3-Operators

1.1. Used to perform operations on Used to perform operations on datadata

2.2. Many types of operators:Many types of operators:Arithmetic - ex: +,-,*,/Arithmetic - ex: +,-,*,/Assignment – ex: =Assignment – ex: =Relational operators <,>,<=,>=Relational operators <,>,<=,>=

3.3. Some operators are : << >> Some operators are : << >>

Page 11: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

11

Operators

Page 12: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

12

4 –Punctuation

1.1. Characters that mark the Characters that mark the end of a statement, or that end of a statement, or that separate items in a listseparate items in a list

Example : , and ;Example : , and ;

Page 13: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

13

Punctuation

Page 14: 1 12/4/1435 h Lecture 2 Programs and Programming Languages.

14

5- Define Syntax

1.1. The rules that must beThe rules that must be fofollowed when writing a llowed when writing a programprogram

2.2. Controls the use of key words, Controls the use of key words, operators, programmer-operators, programmer-defined symbols, and defined symbols, and punctuationpunctuation