مقدمة عن البرمجة باستخدام Visual Basic.Net. الفصل الأول مقدمة للبرمجة نظام المعلومات نظام المعلومات العمليات التي يقوم بها الكمبيوتر العمليات التي يقوم.

Презентация:



Advertisements
Похожие презентации
UNIT 2. Introduction to Computer Programming. COM E 211: Basic Computer Programming UNIT 2. Introduction to Computer Programming Algorithm & Flowcharting.
Advertisements

Sequences Sequences are patterns. Each pattern or number in a sequence is called a term. The number at the start is called the first term. The term-to-term.
© 2009 Avaya Inc. All rights reserved.1 Chapter Two, Voic Pro Components Module Two – Actions, Variables & Conditions.
1/27 Chapter 9: Template Functions And Template Classes.
Time-Series Analysis and Forecasting – Part IV To read at home.
Operators and Arithmetic Operations. Operators An operator is a symbol that instructs the code to perform some operations or actions on one or more operands.
Chap 11-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 11 Hypothesis Testing II Statistics for Business and Economics.
© The McGraw-Hill Companies, Inc., Chapter 4 Counting Techniques.
Here are multiplication tables written in a code. The tables are not in the correct order. Find the digit, represented by each letter.
GET CONNECTED Move Ahead 7 th form VOCABULARY WORK Lets refresh the words. Read the questions and use the new words in your answers.
11 BASIC DRESS-UP FEATURES. LESSON II : DRESS UP FEATURES 12.
1 Another useful model is autoregressive model. Frequently, we find that the values of a series of financial data at particular points in time are highly.
Chapter 6 Digital Arithmetic: Operations and Circuits ECE 221 Intro. Digital Systems Fall Semester 2002 ECE Department, UMASS-Amherst Prof. Hill Prof.
Chap 9-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 9 Estimation: Additional Topics Statistics for Business and Economics.
If you are ready for the lesson, let's start. What kinds of schools do you know? Public school State school Boarding school All – boys school All – girls.
Psychological help for teens I want to create an organization where specialists will help teenagers to solve their problems with parents.
Business Statistics 1-1 Chapter Two Describing Data: Frequency Distributions and Graphic Presentation GOALS When you have completed this chapter, you will.
Moscow Project work. Aims 1.To prove that in the schools of the future dozens of various devices will be used in every classroom. 2. To carry.
Standard I/O and Pipes. Standard Input and Output Linux provides three I/O channels to Programs Standard input (STDIN) - keyboard by default Standard.
SIR model The SIR model Standard convention labels these three compartments S (for susceptible), I (for infectious) and R (for recovered). Therefore, this.
Транксрипт:

مقدمة عن البرمجة باستخدام Visual Basic.Net

الفصل الأول مقدمة للبرمجة نظام المعلومات نظام المعلومات العمليات التي يقوم بها الكمبيوتر العمليات التي يقوم بها الكمبيوتر البرامج والبرمجة البرامج والبرمجة

نظام المعلومات البيان (Data) البيان (Data) المعلومة (Information) المعلومة (Information) البيانمعلومة عمليات

ينايرفبراير ينايرفبراير منتج أ 2030 منتج أ 2030 منتج ب 2520 منتج ب 2520 منتج ج 4023 منتج ج 4023

العمليات التي يقوم بها الكمبيوتر إدخال البيانات (Input Data) إدخال البيانات (Input Data) تخزين البيانات (Store Data) تخزين البيانات (Store Data) إجراء عمليات حسابية (Arithmetic Operations) إجراء عمليات حسابية (Arithmetic Operations) مقارنة القيم والاختيار (compare and make decisions ) مقارنة القيم والاختيار (compare and make decisions ) تكرار أمر أو مجموعة من الأوامر (Repeat Operations) تكرار أمر أو مجموعة من الأوامر (Repeat Operations) إخراج النتائج (Output Information) إخراج النتائج (Output Information)

عمليات الكمبيوتر البيانات Data تخزين البيانات في الذاكرة Store data in Memory العمليات الحسابية Arithmetic Operations مقارنة القيم والاختيار Compare & Make Decisions تكرار العمليات Repeat Operations المخرجات ( المعلومة ) Output (Information)

البرامج والبرمجة البرامج والبرمجة Programs and Programming لغات البرمجة Programming Languages لغات البرمجة Programming Languages لغة الآلة machine language لغة الآلة machine language لغات البرمجة ( لغات عالية المستوى ) High level language لغات البرمجة ( لغات عالية المستوى ) High level language

لغات البرمجة High level language لغة الآلة (0 - 1) Machine language المترجم Compiler المفسر Interpreter

الفصل الثاني خرائط التدفق (Flow Charts) مقدمة (Introduction) مقدمة (Introduction) خرائط التدفق (Flow Charts) خرائط التدفق (Flow Charts)

مقدمة حل المسألة Introduction to problem solving تعريف وتحديد المسألة Define the problem تعريف وتحديد المسألة Define the problem إعطاء اسماء لكل البيانات المعطاة في المسألة والتي ستدخل الحل ( المتغيرات ) Giving names to data (Variables) إعطاء اسماء لكل البيانات المعطاة في المسألة والتي ستدخل الحل ( المتغيرات ) Giving names to data (Variables) إهمال البيانات غير الهامة في الحل إهمال البيانات غير الهامة في الحل Discard all unnecessary information Discard all unnecessary information إيجاد العلاقات بين المتغيرات ووضعها في معادلات إيجاد العلاقات بين المتغيرات ووضعها في معادلات express the relations between variables as functions express the relations between variables as functions ترتيب المعادلات الترتيب المنطقي للوصول إلى الحل ترتيب المعادلات الترتيب المنطقي للوصول إلى الحل Determine the proper algorithm by arranging the equations in correct sequence

مثال Example A school has 1000 students of whom 48 percent are boys. The school gave a party which 70 percent of the students attended. If 60 percent of those attending were boys, how many girls attended the party? عدد الطلبة والطالبات في مدرسة هو 1000 ، 48% منهم بنات، والباقي أولاد، قامت المدرسة بعمل حفل حضره 70% من إجمالي الطلبة والطالبات. فإذا عرفنا أن 60% من الحضور كانوا من الأولاد فما عدد البنات اللاتي حضرن الحفل؟

الحل : 1- السؤال المطلوب الإجابة عنه هو ما هو عدد البنات في الحفل؟ 2- إجمالي عدد الأولاد والبنات في الحفل = x عدد الأولاد في الحفل = y عدد البنات في الحفل = z 3- 48% من طلبة المدرسة من البنات بيان غير مؤثر في الحل ويجب إهماله. 4- العلاقات بين المتغيرات : أ- 70% من إجمالي الأولاد والبنات حضروا الحفل (x) ب- 60% من الحضور أولاد (y) ت- الفرق بين x و y يمثل عدد الحاضرات، وعليه فإن المعادلات التي تمثل العلاقات تكون : a. x = 1000 * 0.70 b. y = x * 0.60 c. z = x - z 5- وحيث إن المتغير x يجب أن يكون معروفاً لحساب المتغير y. كما أن المتغير z لا يمكن حسابه إلا بعد معرفة قيم x,y فإن الترتيب السابق يكون هو الترتيب المنطقي للمعادلات.

Solution: 1 - The question is: How many girls attended the party? 2 - Let x = the total number of students attending the party Let y = the number of boys attending the party Let z = the number of girls attending the party 3 - The given fact that 48 percent of the students are boys has no effect on the problem and may be discarded. 4 - The relationships stated are: a. 70 percent of the students attended ( x ) b. 60 percent of those attending were boys ( y ) c. This implies that the difference between x and y represents the number of girls attending (z). So, we express these relationships as the following equations: a. x = 1000 * 0.70 b. y = x * 0.60 c. z = x – y 5 - Since the variable x must be known to find the variable y and both x and y must be known in order to find z, the equations must be solved in the given order.

خرائط التدفق Flow Charts خرائط التدفق : هي عرض وكتابة الـ Algorithm بطريقة تخطيطية تعتمد على الرسم. خرائط التدفق : هي عرض وكتابة الـ Algorithm بطريقة تخطيطية تعتمد على الرسم. is a mean of visually presenting the flow of data through an information processing systems The flowchart is a mean of visually presenting the flow of data through an information processing systems خرائط التدفق هي تمثيل بياني يعتمد على الرسم لتوضيح ترتيب العمليات اللازمة لحل مسألة. خرائط التدفق هي تمثيل بياني يعتمد على الرسم لتوضيح ترتيب العمليات اللازمة لحل مسألة. A flowchart is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of a problem.

الرموز الأساسية في خرائط التدفق Standard Symbols عملية قرار / اختيار إدخال / إخراج رمز طرفي المفسر

أكثر الأشكال استخداماً More used shapes الرمز الطرفي (Terminal) الرمز الطرفي (Terminal) إدخال / إخراج (Input/ Output) إدخال / إخراج (Input/ Output) معالجة / عملية (Process) معالجة / عملية (Process) قرار / اختيار (Decision) قرار / اختيار (Decision) خط اتجاه (Flow line) خط اتجاه (Flow line)

إرشادات رسم خرائط التدفق Guidelines for drawing flow charts 1. نظافة الخريطة وسهولة التتبع. 2. الاتجاه الطبيعي للعمليات والبيانات ( من اليسار إلى اليمين ومن أعلى إلى أسفل ) 3. أي رمز معالجة / عملية يجب أن يخرج منه خط اتجاه واحد. 4. أي رمز قرار / اختيار يجب أن يدخل فيه خط اتجاه واحد فقط ولكن من الممكن أن يخرج منه خطان على الأقل أو أكثر. 5. الرمز الطرفي به خط اتجاه واحد فقط إما داخل إليه وإما خارج إليه 6. لكتابة الملاحظات نستخدم رمز المفسر 7. إذا تعقدت خرائط التدفق وأصبحت كبيرة فمن الأفضل تقسيم الخريطة إلى أجزاء أصغر وربطها برمز الربط o. 8. يجب التأكد من أن الخريطة لها بداية واحدة وأن الدخول من عند البداية يجب أن يؤدي بنا إلى النهاية. 9. من الأفضل اختبار صلاحية الخريطة باستخدام مدخلات معروف قيمة مخرجاتها مسبقاً.

مميزات خرائط التدفق Advantages of Flow Charts 1. الإتصال 1. الإتصال Communication 2. تحليل الأفعال 2. تحليل الأفعال Effective analysis 3. توثيق صحيح 3. توثيق صحيح Proper documentation 4. تكويد كفء 4. تكويد كفء Efficient coding 5. تصحيح الأخطاء 5. تصحيح الأخطاء Proper debugging 6. كفاءة إصلاح البرنامج 6. كفاءة إصلاح البرنامج Efficient program maintenance

عيوب خرائط التدفق Disadvantages of Flow Charts 1. أسلوب معقد 1. أسلوب معقد Complex logic 2. إجراء تعديلات 2. إجراء تعديلات Alterations and modifications 3. النسخ Copying 4. كثرة التفاصيل More Details

بعض الأمثلة على خرائط التدفق Some examples on Flow Charts

المثال الأول ارسم خريطة تدفق لتبين ما هي الخطوات التي ستقوم بها في حالة عدم عمل إحدى لمبات الإضاءة؟ Draw flow chart to represent what will you do if your lamp doesn t work?

Lamp doesn t work Lamp burned out? Lamp Plugged in? Plug in lamp Replace lamp Call electrician NO Yes Yes NO هل اللمبة في الفيشة هل اللمبة محترقة اللمبة لا تعمل قرار / اختيار Decision خط اتجاه Flow line المفسرAnnotation رمز طرفي Terminal

المثال الثاني ارسم خريطة تدفق لتبين عملية قراءة رقمين ثم قسمتهما وإظهار ناتج القسمة. Draw flow chart to represent the process of reading two numbers, dividing them, and displaying the result

Start Is number2 = 0? End Yes عمليةProcess Read number2 Read number1 Output the result Result = number1 / number2 إدخال / إخراج Input / Output NO Print Division is impossible is impossible End

المثال الثالث ارسم خريطة تدفق لحساب حاصل جمع أول 100 رقم طبيعي ( صحيح ) وهذا يعني أننا نريد أن نحسب ما يلي : المجموع = Draw flow chart to find the sum of first 100 natural numbers. This means that we want to find sum where sum is given by: Sum = ……………

Start Is N = 100? End Yes Print Sum NO Sum = 0 N = 0 Sum = Sum + N N = N + 1 New value of sum= old value of sum + N هل عدد الأرقام التي تم جمعها 100 ؟ Sum هو المتغير الذي يمثل المجموع N هو المتغير الذي يمثل الرقم الطبيعي

المثال الرابع ارسم خريطة تدفق لإيجاد الرقم الأكبر من بين ثلاثة أرقام A,B,C Draw flow chart to find the largest from three numbers A,B and C

Start Is A > C ? End Yes Print A Read A,B,C NO Print B Print C Is A > B ? Is B > C ? Yes Yes NO NO

قامت دنيا برسم خريطة تدفق لعملية جمع عددين قم بتصحيح الخطأ فيها الخريطة بعد التصحيح الخريطة قبل التصحيح