Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Engineering 2 nd Semester Dr. Rabie A. Ramadan 2.

Similar presentations


Presentation on theme: "Computer Engineering 2 nd Semester Dr. Rabie A. Ramadan 2."— Presentation transcript:

1 Computer Engineering 2 nd Semester Dr. Rabie A. Ramadan http://rabieramadan.org/classes/2011/prog/ 2

2 2 Class Rules It will be a tough class, however, Enjoy what you do Do not worry about the exam as long as : You are reading and understanding the materials in the book I do not care how are you going to learn programming language The section will help you to do so but it is your responsibility to dig in the subject

3 3 Class Rules Attendance is a must Assignments must be delivered on time  no exception whatever the reason. The source code must be submitted with any programming assignment

4 Class Rules You can bring anything to drink but NO FOOD PLEASE When you come in, DO NOT knock on the door When you want to leave, Do NOT tell me  Just leave but you will counted as absent

5 5 Class Information Text Books Rabie Ramadan, Computer Engineering for Developers, 2011 Other sources Website http://www.rabieramadan.org/classes/2011/prog/

6 Before We Start …. 25 th of January 25 th of January Be Smart

7 Programming Language programming language is a tool used by a programmer to give the computer very specific instructions in order to serve some purpose for the user. A program is like a recipe. mix eggs, butter, sugar in a bowl add flour, baking soda, and flavorings mix until creamy add chocolate chips bake in the oven. Can you make chocolate cake out of this recipe ? Can you make chocolate cake out of this recipe ?

8 Do we need more details ? Yes place two eggs in a bowl add 1.5 c. butter to the eggs.. bake cookies for 10-12 minutes at 375 degrees or until brown Is there anything missing ?Is there anything missing ? Well, it does not say how to put the eggs shelled or not.Well, it does not say how to put the eggs shelled or not. It adds some illustrationsIt adds some illustrations

9 Computer Programming Computer does not understand You need to tell it every details Therefore, we have languages to tell the computer what to do.

10 Is it only one language ? No, There are many languages Each one is designed with a purpose in mind

11 What is behind the high level language? Computer does not understand the high level language The program must be translated to the machine language Compiler / Interpreter Source Code Compiler / Interpreter Object Code

12 Compiler/ Interpreter

13 Why C++? C++ allows expression of abstract ideas C++ is a third generation language that allows a programmer to express their ideas at a high level as compared to assembly languages. C++ still allows a programmer to keep low-level control it has some of the "feel" of an assembly language.

14 Why C++? C++ has national standards (ANSI) Code written in C++ that conforms to the national standards can be easily integrated with preexisting code. C++ is reusable and object-oriented C++ is widely used and taught

15 Structure of a program

16 Line separation

17 Multiple instructions

18 Type of Structuring

19 Comments

20 C++’ Names The name of a variable: Starts with an underscore “_” or a letter, lowercase or uppercase, such as a letter from a to z or from A to Z. Examples are Name, gender, _Students, pRice Can include letters, underscore, or digits. Examples keyboard, Master, Junction, Player1, total_grade, _Score_Side1

21 C++’ Names Cannot include special characters such as !, %, ], or $ Cannot include an empty space Cannot be any of the reserved words Should not be longer than 32 characters (although allowed)

22 Reserved keywords

23 Data Types A Byte

24 Data Types Character

25 Data Types \

26 Reading Assignment 26 Please Read: Program Structure, Variables, Data Types, and Constants Operators and Operands Basic Input/Output


Download ppt "Computer Engineering 2 nd Semester Dr. Rabie A. Ramadan 2."

Similar presentations


Ads by Google