Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Computer مراجعة حاسب آلى 3 ع ت1

2,786 views

Published on

مراجعة

Published in: Education
  • Be the first to comment

  • Be the first to like this

Computer مراجعة حاسب آلى 3 ع ت1

  1. 1. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Contents Subject Page Chapter one: an introduction to programming 2 Work Sheet 1 4 Chapter two: flowcharting 7 Work Sheet 2 13 Chapter three: pseudo code 24 Work Sheet 3 32 1
  2. 2. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Chapter four: Object Oriented Programming 37 Work Sheet 4 40 Chapter five: Introduction To Integrated Development Environment (IDE) 42 Work Sheet 5 50 Chapter Six: Introduction to controls 55 Work Sheet 6 69 Governorate Exams 75 2
  3. 3. El-Zahraa Language School Computer Booklet For M البتتدائي 3 3
  4. 4. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Chapter 1 An Introduction To Programming Information s ystem : Is a combination between technology (computers) and people that enable organization to collect data, store it, and transform it into information. The difference between Data and Information:- Data Information 4
  5. 5. El-Zahraa Language School Computer Booklet For M البتتدائي 3 1) Raw of facts that are collected and stored by the information system. 2) Can be in the form of numbers, letters, images, sound clips, video clips, names, dates, prices, temperatures, and grades in an examination. 1) Data after processing. 2) There are many familiar kinds of information such as written reports, lists, tables, and graphs. * Software: is composed of one or more lists of instructions called programs. * Programming: is the process of creating these lists of instructions of the programs. * Algorithm: The step by step logic of solving problems. * Variable: It is a memory location that holding a piece of data which assigned a name. 5
  6. 6. El-Zahraa Language School Computer Booklet For M البتتدائي 3 * The six operations that computer can carry out to process data into information:- 1. Input data (reading data). 2. Store data in internal memory. 3. Perform arithmetic operation on data. 4. Compare two values and select one of two alternative actions. 5. Repeat a group of actions any number of times. 6. Output the results of processing. 6
  7. 7. El-Zahraa Language School Computer Booklet For M البتتدائي 3 The advantages of VISUAL BASIC .NET:- 1- Enables you to write windows applications. 2- Replaces many of the numbers used by machine language with words and symbols that we can more easily understand and remember. 3- Enables a programmer to visually assemble a program's window from parts in a toolbox. compilation interpretation 7
  8. 8. El-Zahraa Language School Computer Booklet For M البتتدائي 3 1 ) Compiled program will run faster 1 ) interpreted program will run slower than an interpreted program than an Compiled program 2) Errors are more difficult to find 2) Errors are more easier to find during during compilation interpretation Notes:- *Th e r e a r e ma n y k i n d s o f programming languages, including FORTRAN, COBOL, C++, C#, JAVA, and Basic. There are many versions of the BASIC languages the older versions of it like GW-BASIC, and QuickBasic can do programs for DOS operating system only. The DOS versions are now obsolete. 8
  9. 9. El-Zahraa Language School Computer Booklet For M البتتدائي 3 * Visual Basic has an advantage over other languages in that Visual Basic projects can be interpreted during the design and testing process, but can then be compiled into an executable program when all the errors have been removed. 9
  10. 10. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Work Sheet 1 Complete : 1- ……………is the combination of technology ( computers ) and people that enables organization to collect data, store them to transform it into information. 2- ……… are raw of facts which are collected and stored by the information system. 3- Data can be in the form ………., …………, ………… ………… or ………………. 4- Software is composed of one or more lists of instructions called ………….. and the process of creating these lists of instructions is ………………... 5- Once data have been input, they are stored in memory locations are called…………… . 6- The arithmetic operations like ………… , ………… , ………….. , …………… and …………... 7- Output information can take many forms display on a ………… , …………. and 10
  11. 11. El-Zahraa Language School Computer Booklet For M البتتدائي 3 ……………….. 8- …………… is a form of problem solving which aim is to develop a step by step process to solve the problem . 9- Computers understand …………… language which is entirely composed of …. and …. 10-The programming languages are such as Visual basic.net which has …………. and ……………… to change English into machine language. 11- There are many kinds of programming languages including ………… , ………….. , ….., ….. ,…….. and……….. 12- The older versions of basic are ……………. and ……………. can do programs for Dos operating system only. 13- Visual basic.net replaces many of the numbers used by machine language with ………… and …………… 14- English languages are referred …………… language because they are close to the …………….. 11
  12. 12. El-Zahraa Language School Computer Booklet For M البتتدائي 3 15- There are two translation process to machine language ……………….. and ……………… 16- The ………….. is faster than …………. to convert the English to machine language. 17- The errors are more difficult to find during ………………. translation. 12
  13. 13. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Put (  ) or ( X ) : 1- Data may come from a barcode reader. ( ) 2- Input data can not come from a flash memory. ( ) 3- Computers understand high level language into the machine language. ( ) 4- Basic cannot change English language into the machine language. ( ) 5- We cannot write windows application through visual basic.net. ( ) 6- Quick basic can write windows application. ( ) 7- VB.net can be more easily understand and remember than the older versions. ( ) 8- The interpretation process stops and an error message is displayed when the program encounter a statement's error. ( ) 9- Interpreted program is faster than a compiled program. ( ) 10- The errors are easier to find during compilation. ( ) 11- VB.net projects have a compiler only. ( ) 13
  14. 14. El-Zahraa Language School Computer Booklet For M البتتدائي 3 12-Machine language is called "High level language" ( ). 13-The compiler is characterized by the easiness of the errors discovery and the speed of running the program ( ). 14-The machine language which the computer can understand is written in English but it has a set of rules and conditions when writing it ( ). 15-The compiler changes the instructions of the programming language completely into the machine language before performing any instruction ( ). Mention the six operations to perform ( convert ) data into information:- 1. ……………………………… 2. ………………………………. 14
  15. 15. El-Zahraa Language School Computer Booklet For M البتتدائي 3 3. ………………………………... 4. ………………………………… 5. ………………………………… 6. ………………………………… Define the following : 1. Information System: ……………………………………………………………………………………… ………………………………………………………………………………… 2. Software : …………………………………………………………... 3. Program : 15
  16. 16. El-Zahraa Language School Computer Booklet For M البتتدائي 3 ……………………………………………………………………. 4. Programming : ……………………………………………………………... 5. Variable : …………………………………………………………………….. 6. Algorithm: ……………………………………………………………………... Compare between each of the following a. Data and Information: 16
  17. 17. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Data Information b. High level language and Machine language: High level language Machine language 17
  18. 18. El-Zahraa Language School Computer Booklet For M البتتدائي 3 c. Compilation and Interpretation: Compilation Interpretation 18
  19. 19. El-Zahraa Language School Computer Booklet For M البتتدائي 3 19
  20. 20. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Chapter 2 Flow Charting The main needed steps for problem solving as follows: 1. Define the problem 2. Assemble known quantities and assign variable names 3. Discard unimportant data. 4. Establish relationships and express them as equations. 5. Determine the proper algorithm by arranging the equations in correct sequence. 20
  21. 21. El-Zahraa Language School Computer Booklet For M البتتدائي 3 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? 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 21
  22. 22. El-Zahraa Language School Computer Booklet For M البتتدائي 3 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). 22
  23. 23. El-Zahraa Language School Computer Booklet For M البتتدائي 3 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. Flowchart: - 23
  24. 24. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of a problem. The 5 basic flowcharting symbols are: 1-Terminal block 2-Input / Output 3- Process block 4- Decision block 5- Flow lines The following are some guidelines in flowcharting: a. The flowchart should be clear, neat and easy to follow. b. The usual direction of the flow of a procedure or a system is from left to right or top to bottom. 24
  25. 25. El-Zahraa Language School Computer Booklet For M البتتدائي 3 c. Only one flow line should come out or from a process symbol. d. Only one flow line should enter a decision symbol, but two or three flow lines. e. Only one flow line is used in conjunction with terminal symbol. f. you can use the annotation symbol to describe data or computational steps more clearly. This is top secret data 25 Stop End
  26. 26. El-Zahraa Language School Computer Booklet For M البتتدائي 3 g. If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flow lines. h. Ensure that the flowchart has a logical start and finish. i. It is useful to test the validity of the flowchart by passing through it with a simple test data. Advantages of using flowcharts:- a. Communications. b. Effective analysis. c. Proper documentation. d. Efficient coding. 26
  27. 27. El-Zahraa Language School Computer Booklet For M البتتدائي 3 e. Proper debugging. f. Efficient program maintenance. Limitations of using flowcharts: a. Complex logic. b. Alterations and modifications. c. In the technical details of how it is done. 27
  28. 28. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Examples:- 28
  29. 29. El-Zahraa Language School Computer Booklet For M البتتدائي 3 29
  30. 30. El-Zahraa Language School Computer Booklet For M البتتدائي 3 30
  31. 31. El-Zahraa Language School Computer Booklet For M البتتدائي 3 31
  32. 32. El-Zahraa Language School Computer Booklet For M البتتدائي 3 32
  33. 33. El-Zahraa Language School Computer Booklet For M البتتدائي 3 33
  34. 34. El-Zahraa Language School Computer Booklet For M البتتدائي 3 34
  35. 35. El-Zahraa Language School Computer Booklet For M البتتدائي 3 35
  36. 36. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Work Sheet 2 Complete : 1- The …………….is simply a tool which serves to assist in problem solving. 2- The …………… is a visually presenting the flow of data through an information processing system. 3- The …………….. is a diagrammatic representation that follows the sequence of operations to be performed to get the problem solution. 36
  37. 37. El-Zahraa Language School Computer Booklet For M البتتدائي 3 4- The five basic flow charting symbols are………….., ……….. and ………… , ………. , ………… and ……………. 5- The usual direction of the flow of a procedure is from ……… to …………… or from .……….. to ……….. 6- The advantages of using flowchart are …………………. , ……………….. , …………………, ………………... 7- The disadvantages of using flowchart are ……………. , …………………... Put (  ) or ( X ) : 37
  38. 38. El-Zahraa Language School Computer Booklet For M البتتدائي 3 1- Once the flowchart is drawn it becomes difficult to write the program in any machine language. ( ) 2- The direction of the flow of procedure is from right to left. ( ) 3- We can draw only one flow line enters a decision symbols. ( ) 4- We can draw two or three flow lines may leave the decision symbol. ( ) 5- We can draw many flow lines from or to a terminal symbols. ( ) 6- We can easy modify any alternation are required the flow chart. ( ) 7-To express the input and output of data information in the flowchart s we use ( ) symbol ( ). 8 -Many programmers prefer the flowcharts over pseudo code when solving a program ( ). 38
  39. 39. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Define:- - Flowchart: …………………………………………………………………………………… …………………………………………………………………………………... What are the main steps of "Problem Solving"? a. …………………………………………. b. …………………………………………. c. …………………………………………. d. …………………………………………. e. …………………………………………. 39
  40. 40. El-Zahraa Language School Computer Booklet For M البتتدائي 3 What are the basic flow chart Symbols ? ………… ……………. ……………. …………. …………. Mention the rules of drawing a "Flow-chart": 1. ………………………………………………………………… 2. ………………………………………………………………… 3. ……………………………………………………………........ 4. …………………………………………….. ……………….…. 5. …………………………………………………………………. 6. …………………………………………………………………. 7. ………………………………………………………………….. 8. ………………………………………………………………….. 9. ………………………………………………………………….. 40 Process block Terminal block Desicion block Input / output blockFlow Lines
  41. 41. El-Zahraa Language School Computer Booklet For M البتتدائي 3 What are the advantages of using flow-charts? a. …………………. b. …………………….. c. ………………….. d. ……………………... e. …………………. F. …………………….. 41
  42. 42. El-Zahraa Language School Computer Booklet For M البتتدائي 3 What are the limitations of using flow-chart? a. …………………… b. ……………………………………. c. ……………………………………………………………….. Correct the drawed flowchart representing the addition of two numbers and printing the result 42 start Result = Number1 + Number2 Read number1 Read number2 Output the result End ( ) ( …) ( …) ) (… ) ( ... ) (… )
  43. 43. El-Zahraa Language School Computer Booklet For M البتتدائي 3 43
  44. 44. El-Zahraa Language School Computer Booklet For M البتتدائي 3 44
  45. 45. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Draw a flowchart to read the age of Hany and Hesham, then it prints the name of the elder? 45
  46. 46. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Draw a flowchart to read a temperature in Fahrenheit degrees and convert it into Celsius degrees, using the formula C = 5 ( F°- 32 ) 9 46
  47. 47. El-Zahraa Language School Computer Booklet For M البتتدائي 3 47
  48. 48. El-Zahraa Language School Computer Booklet For M البتتدائي 3 48
  49. 49. El-Zahraa Language School Computer Booklet For M البتتدائي 3 49
  50. 50. El-Zahraa Language School Computer Booklet For M البتتدائي 3 50
  51. 51. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Draw a flowchart to represent the process of reading two numbers, dividing them, and then displaying the result. 51
  52. 52. El-Zahraa Language School Computer Booklet For M البتتدائي 3 52
  53. 53. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Draw a flowchart that reads the radius of a sphere " r " , then it calculates its volume " V " and surface area " A " using formulas V = 4 Π r3 A = 4 Π r2 3 22 Π = 7 If the read radius is Negative, flowchart should print a warning message then terminates. 53
  54. 54. El-Zahraa Language School Computer Booklet For M البتتدائي 3 54
  55. 55. El-Zahraa Language School Computer Booklet For M البتتدائي 3 55
  56. 56. El-Zahraa Language School Computer Booklet For M البتتدائي 3 56
  57. 57. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Chapter 3 Pseudocode Pseudocode :- Means "false code". That means that it is not the programming language "code" or statements that are used to direct the action of the computer. The only components used to write a pseudocode are:- 1. Words 2. Clauses 3. Sentences 57
  58. 58. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Rules and Constraints:- 1. The data names of variables should be meaningful. 2. All statements should be written in a way that is easy to understand. Program Logic Structures:- 1- Sequence In pseudo coding, statements are done in sequential fashion unless one of the statements contains an instruction that interrupts the normal sequential flow. 2- Selection 58
  59. 59. El-Zahraa Language School Computer Booklet For M البتتدائي 3 An IF statement is presented. There can only be two outcomes as a result of the IF statement being processed. One as a result of the tested condition being TRUE and the other as being FALSE. Therefore the IF-THEN-ELSE control structure can be represented as follows: 59
  60. 60. El-Zahraa Language School Computer Booklet For M البتتدائي 3 IF condition being tested is TRUE Then Do all statements listed under “Then”. (executed when the tested condition is “TRUE”). Else Do all statements listed under “Else”. (executed when the tested condition is “FALSE”). 60
  61. 61. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Notes:- The tested condition can be greater than(>), less than,(<) equal to(=), greater or equal to(>=), less than or equal to(<=), or not equal to(<>) . The result of testing the condition must be TRUE or FALSE. Examples:- M= 25 N = 12 IF ( M >= N ) Then Statement 1 Else Statement2 END IF Statement 3 61
  62. 62. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Note that in this case Statement 1, followed by Statement 3 will be executed. Note that if the tested condition was just an expression the result of which was a number, then only the value of zero will represent FALSE, where all other values will represent TRUE. For example: 62
  63. 63. El-Zahraa Language School Computer Booklet For M البتتدائي 3 X= 10 Y = 5 IF (X – Y) Then Statement 1 Else Statement2 END IF Statement3 So Note that in this case Statement 1, followed by Statement 3 will be executed. 63
  64. 64. El-Zahraa Language School Computer Booklet For M البتتدائي 3 3- Iterations This statement implies that a certain activity or action will be performed repetitively a certain number of times or until a certain condition is met. Advantages and disadvantages of Pseudocode � It is simple because it uses English-like statements. � No special symbols are used. � No specific syntax is used. � It is very easy to translate its statements to that for high level languages on a one-for- one basis. 64
  65. 65. El-Zahraa Language School Computer Booklet For M البتتدائي 3 The main disadvantages of pseudocode is that : � It can be quite lengthy for complex problems. SOME EXAMPLES ON PSEUDOCODING Example 1 65
  66. 66. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Write a pseudo code to represent the process of reading two numbers, dividing them, and then displaying the result. Note that: the corresponding flowchart is given in example 2.3. Solution: 1. Input (Read) the first number “number1”. 2. Input (Read) the second number “number2”. 3. IF the value of number1 = 0 Then Print “Division is impossible because number2 is zero” Go to step 4 66
  67. 67. El-Zahraa Language School Computer Booklet For M البتتدائي 3 ELSE result = number1 / number2 Print number1, number2, and result END IF 4. Stop processing 67
  68. 68. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Example 2 Draw a pseudo code that reads the radius of a sphere 4 " r " , then it calculates its 22 volume " V " and surface area " A " using formulas V= 3 Π r3 , A = 4 Π r2 , Π = 7 - If the read radius is Negative, flowchart should print a warning message then terminates. Solution: 22 1-Read r, Π = 7 68
  69. 69. El-Zahraa Language School Computer Booklet For M البتتدائي 3 2-If r = Negative then Print a message "the calculations are impossible ". Go to step 3 Else V = 4 Π r3 3 A = 4 Π r2 Print V , A 3- Stop processing 69
  70. 70. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Example 3 Draw a pseudo code to find the largest of three numbers of A, B, and C. Solution: 70
  71. 71. El-Zahraa Language School Computer Booklet For M البتتدائي 3 71
  72. 72. El-Zahraa Language School Computer Booklet For M البتتدائي 3 72
  73. 73. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Example 4 Draw a pseudo code to find the sum of first 100 natural numbers. This means that we want to find sum where sum is given by: sum = 1+2+3+4+5+…………………………..+99+100. Solution: 73
  74. 74. El-Zahraa Language School Computer Booklet For M البتتدائي 3 74
  75. 75. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Work Sheet 3 Complete : 1-The components of the "Pseudo code" are ………………, ………… and ………... Define:- - Pseudo code: 75
  76. 76. El-Zahraa Language School Computer Booklet For M البتتدائي 3 …………………………………………………………………………………… …....................................................................................................................... What are the rules and constraints of the "Pseudo code"? *……………………………………………………….. * ……………………………………………………….. Complete the following: The advantages of "pseudo code" are a. ………………………………………………… 76
  77. 77. El-Zahraa Language School Computer Booklet For M البتتدائي 3 b. ………………………………………………… c. ………………………………………………… d. ………………………………………………… The disadvantage of "pseudo code" is ……………………………………………………….. 77
  78. 78. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Write a pseudo code to represent the process of reading two numbers, dividing them, and then displaying the result. 78
  79. 79. 4 3 22 7 El-Zahraa Language School Computer Booklet For M البتتدائي 3 Draw a pseudo code that reads the radius of a sphere " r " , then it calculates its volume " V " and surface area " A " using formulas V = Π r3 , A = 4 Π r2 Π = - If the read radius is Negative, flowchart should print a warning message then terminates. 79
  80. 80. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Draw a pseudo code to find the largest of three numbers of A, B, and C 80
  81. 81. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Draw a pseudo code to find the sum of first 100 natural numbers. This means that we want to find sum where sum is given by: sum = 1+2+3+4+5+ …………………………..+99+100. 81
  82. 82. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Chapter 4 ( OOP ) Object Oriented Programming The Object Model In Visual Basic you will work with objects, which have properties, Methods and events. Each object is based on a class. Classes 82
  83. 83. El-Zahraa Language School Computer Booklet For M البتتدائي 3 - A class is a template used to create a new object. Classes contain the definition of all available properties, methods, and events for objects created for this class. - A prototype or blueprint for an object that includes the specifications for its properties and methods. **Each time you create a new object, it must be based on a class. Objects Object is something that exists. We deal with objects in our daily life. In real world objects can be parts of other objects. *Examples of objects in Object Oriented Programming (OOP) are forms and controls. *My Pen object has properties like its color that is blue and the amount of ink in it which is low. 83
  84. 84. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Properties A characteristic or attribute of an object. *When you refer to a property, you first name the object, add a period and then name the property. For example, MyPen.Color = Blue. Methods a predefined actions provided with an object. 84
  85. 85. El-Zahraa Language School Computer Booklet For M البتتدائي 3 *Some examples of methods are: if the object is Auto The methods, or actions, of auto might be Start, Speed Up, Slow Down, if the object is Form1 The methods of Form1 like Close, and Clear. Events An action that may be caused by the user, such as a click, drag, or key press. *Events happen for objects in Visual Basic. For example the event of the mouse movement on a window which is called "Mouse Move", or pressing a key on the keyboard on a window which is called "Key Press", and so on. The Form will respond to these events according to the instructions that were written before. 85
  86. 86. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Example:- A comparison between a Form and a cassette:- 86
  87. 87. El-Zahraa Language School Computer Booklet For M البتتدائي 3 87
  88. 88. El-Zahraa Language School Computer Booklet For M البتتدائي 3 The Object Oriented Terminology:- Encapsulation - It is sometimes referred to as a data hiding. - An OOP feature that specifies that all methods and properties of a class be coded within the class, the class can hide or show the properties and methods. Inheritance 88
  89. 89. El-Zahraa Language School Computer Booklet For M البتتدائي 3 - Is the ability to create a new class from an existing class. - By creating a new class that inherits from an existing class, you can add, or modify class variables and methods. - The inherited class is called a subclass, derived class, or child class, where the original class is known as the base class, super class, or parent class. - The real purpose of inheritance is reusability, which is a big advantage of OOP over traditional programming. When you create a new class, you can then use that class in multiple projects. 89
  90. 90. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Work Sheet 4 Complete : 1- We deal with ……….. in our daily life. 2- A medicine in the form of a capsule is considered ……………… 3- Car …………..white ………….. running in the street …………….. 4- In visual basic we work with objects, which have ………….., ………… and ………... Each object is based on a class. 90
  91. 91. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Put (  ) or ( X ) : 1- The class is constructed out of object. ( ) 2- The computer is considered an object that is consisting of many objects. ( ) 3- The color of a pen is a "method ". ( ) 4- Making cassette on is considered "event ". ( ) 5- The shape of an object is determined by its properties. ( ) 6- Object has properties, Method, and events. ( ) 7- Object is constructed out of a class. ( ) 8- Encapsulation is used to hide information of the class. ( ) 9- Derived Class inherits from the base class properties only. ( ) Fill in the space using the following words: 91
  92. 92. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Object - Class – Event – Property – Method – Encapsulation – Inheritance 1- Clicking the mouse inside the window is considered…………… 2- The width of the window is considered ………….. 3- Pressing a key from the keyboard inside the window is considered …………… 4- Properties that the son takes from his father is considered …………….. 5- Going to school is considered …………….. 6- Amount of water in a lake is considered ……………. 7- Circuit diagram of your cassette is considered …………. 8- …………….. is considered hiding for information in a class. Define:- 92
  93. 93. El-Zahraa Language School Computer Booklet For M البتتدائي 3 1. Object: …………………………………………………………………………………… 2. Properties: ……………………………………………………………………………………. 3. Method: ……………………………………………………………………………………. 4. Events: ……………………………………………………………………………………. 5. Classes: ……………………………………………………………………………………. 93
  94. 94. El-Zahraa Language School Computer Booklet For M البتتدائي 3 6. Encapsulation: ……………………………………………………………………………………. 7. Inheritance: …………………………………………………………………………………..... Compare between each of the following:- - Form and Cassette: Objects Form Cassette 94
  95. 95. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Properties Methods events 95
  96. 96. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Chapter 5 Visual Basic 2005 IDE The Visual Basic 2005 IDE - The Visual Studio Environment is where you create and test your projects. - The development environment is called the Integrated Development Environment (IDE). - The IDE consists of various tools, including a form designer, which helps you to visually create a form; an editor, for entering and modifying program code; a compiler, for translating the Visual Basic statements into the intermediate machine code; a debugger, to locate and correct program errors; an object browser, to view the classes methods, and events; and a Help facility. 96
  97. 97. El-Zahraa Language School Computer Booklet For M البتتدائي 3 1-The IDE initial screen 97
  98. 98. El-Zahraa Language School Computer Booklet For M البتتدائي 3 98
  99. 99. El-Zahraa Language School Computer Booklet For M البتتدائي 3 - The contents of the Start Page vary, depending on whether you are connected to the Internet links. 2- The New Project Dialog 99
  100. 100. El-Zahraa Language School Computer Booklet For M البتتدائي 3 You will create your first Visual Basic projects by selecting File/New Project or clicking New Project on the Start page. 100
  101. 101. El-Zahraa Language School Computer Booklet For M البتتدائي 3 3- The IDE main window Each window can be moved, resized, opened, or closed. 101
  102. 102. El-Zahraa Language School Computer Booklet For M البتتدائي 3 4- The Toolbars The Visual Studio toolbars contain buttons that are shortcuts for menu commands. The standard toolbar is shown Figure. 102
  103. 103. El-Zahraa Language School Computer Booklet For M البتتدائي 3 5- The Form Designer The Form Designer is where you design a form 103
  104. 104. El-Zahraa Language School Computer Booklet For M البتتدائي 3 that interface. Change the size of the form by selecting the border or by using the handles. When you begin a new the default name “Form". 104
  105. 105. El-Zahraa Language School Computer Booklet For M البتتدائي 3 6- The Solution Explorer Window The Solution Explorer window holds the file included in your project and a list of the classes it references. 7- The Properties Window 105
  106. 106. El-Zahraa Language School Computer Booklet For M البتتدائي 3 We use the Properties Window to set the properties of objects in your project. 8- The Toolbox The Toolbox contains the tools 106
  107. 107. El-Zahraa Language School Computer Booklet For M البتتدائي 3 you use to place controls on a form. 107
  108. 108. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Creating your first Visual Basic (VB) Project To get started building your "Hello Egypt" application, follow the following steps: 1- After choosing File menu then select ”New Project” from the Visual Studio main menu, the New Project Dialog Box appears - You can also double click “Create Project” in the “Recent Projects” pane. 2- In the "Project types" pane choose Windows and in "Templates pane" double click Windows Application. 108
  109. 109. El-Zahraa Language School Computer Booklet For M البتتدائي 3 3- Type the name you want to give to your project that will replace the default name in the Name text box. In this example, I typed "Hello". 4- Click OK. 5- Click the Toolbox on the left side of the screen. The Toolbox appears, with Windows Forms Controls, I f you don't see the tool box ( view menu then select toolbox ). 109
  110. 110. El-Zahraa Language School Computer Booklet For M البتتدائي 3 110
  111. 111. El-Zahraa Language School Computer Booklet For M البتتدائي 3 3- Type the name you want to give to your project that will replace the default name in the Name text box. In this example, I typed "Hello". 4- Click OK. 5- Click the Toolbox on the left side of the screen. The Toolbox appears, with Windows Forms Controls, I f you don't see the tool box ( view menu then select toolbox ). 111
  112. 112. El-Zahraa Language School Computer Booklet For M البتتدائي 3 112
  113. 113. El-Zahraa Language School Computer Booklet For M البتتدائي 3 113
  114. 114. El-Zahraa Language School Computer Booklet For M البتتدائي 3 114
  115. 115. El-Zahraa Language School Computer Booklet For M البتتدائي 3 6- On Form1, click the position as seen As you can see, means that the value of its default Text property “Button1.text" is button 1. 115
  116. 116. El-Zahraa Language School Computer Booklet For M البتتدائي 3 116
  117. 117. El-Zahraa Language School Computer Booklet For M البتتدائي 3 117
  118. 118. El-Zahraa Language School Computer Booklet For M البتتدائي 3 118
  119. 119. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Saving Your Application 1. Choose File -> "Save All" from the Visual Studio main menu. The Save Project Dialog Box appears. 119
  120. 120. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Running your Windows Application Studio Environment: Press F5 key on your keyboard project as a Windows program. Click the button on your form. You will see that the button text will change into “Hello Egypt". Running your Studio outside the visual basic Environment: a. Choose Build Hello from the main menu. 120
  121. 121. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Visual Studio will compile your application into a Windows program with file extension .exe. We will get executable fileHello.exe. b. Go to the folder that contains your Windows application. c. Double click Hello.exe to run it. 121
  122. 122. El-Zahraa Language School Computer Booklet For M البتتدائي 3 122
  123. 123. El-Zahraa Language School Computer Booklet For M البتتدائي 3 123
  124. 124. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Work Sheet 5 Complete : 1-To create a new project select ……………. From………… menu then select ………….. from project type, select ………………. in the templates box to type the project …………in name text box. 2- The visual studio toolbars contains buttons that are ……………. for ……………command. 3- …………… is where you design a form that makes your user interface. 4- You can change the size of form window by selecting the ……………... 5- ……………….holds the files’ names for the files included in your project. 124
  125. 125. El-Zahraa Language School Computer Booklet For M البتتدائي 3 6-………………….. used to set the properties of objects in your project. 7- ……………. contains the tools you use to place controls on a form. 8- To load the button onto form1 ……………… the button control to load it. 9- To enter code view window ………………. the button control. 10- To change the text property of “button1 “ to “hello Egypt” write your code ………………. on the line preceding the end sub. 11- To save your application choose …………. from ………… menu to determine the …………. of project 12- To run your window application within the visual press ………. key. 125
  126. 126. El-Zahraa Language School Computer Booklet For M البتتدائي 3 13- To run your “hello” window application outside the visual choose ……………… from …………menu to compile it with file extension ……….. to open it by ………………. by the mouse. 14- IDE stands for ……………………………………….. 15- To display or hide the visual studio start page select ……………. from…………menu. 16-You can open a new project by selecting ………………….. from ……… menu. 17-You can open an existing project from ……… menu or by using …………… from ………….page. 126
  127. 127. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Put (  ) or ( X ) : 1-You can’t move or resize the visual’s windows. ( ) 2- The properties window holds the files’ names included in your project. ( ) 3- The properties window set the properties of objects in your project. ( ) 4- Toolbar contains the tools you use to place controls on a form. ( ) 5- The default value for “button1.text “ is “button1 “. ( ) 6- To view the toolbox go to file menu. ( ) 7- Visual compile the application with extension ( .bmp). ( ) 8- To run your window application within the visual press F6 key. ( ) 127
  128. 128. El-Zahraa Language School Computer Booklet For M البتتدائي 3 9- The contents of visual studio start page are the same to connecting to the internet. ( ) 10- To display or hide the start page from view menu. ( ) 11- You can begin a new project from file menu. ( ) 12- You can open an existing project from file menu only. ( ) 13- To deselect the control click inside it. ( ) 14- To delete a control, select the control then press shift on the keyboard. ( ) 15- To move a control select it then point inside the control and drag it to a new location. ( ) 16- To resize a control, you should drag the handles. ( ) 128
  129. 129. El-Zahraa Language School Computer Booklet For M البتتدائي 3 17- To select a control, double click on the control. ( ) 18- To make a properties window active, click on the title bar of it. ( ) 19- You can align the controls automatically. ( ) 20- To debug the project select from the keyboard. ( ) 21-You can stop running the application select small X in the upper right of the form window. ( ) 129
  130. 130. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Choose the right answer between brackets:- 1- To run you window application within the visual studio press (F10-F5-F6) key from the keyboard. 2- To enter code view window ( right click –left click – double click) the button control. 3- ( Properties window – Toolbox – Tool bar ) contains the tools you use to place controls on a form. 4- ( Properties window- Solution explorer- Form window ) holds the files’ included in your project. 5- ( Web part – Recent project) is useful if you are looking for learning opportunities. 6- You can open an existing project by using ( View – Build – File )menu . 130
  131. 131. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Task : Create a user interface with button controls that is shown 131
  132. 132. El-Zahraa Language School Computer Booklet For M البتتدائي 3 132
  133. 133. El-Zahraa Language School Computer Booklet For M البتتدائي 3 133
  134. 134. El-Zahraa Language School Computer Booklet For M البتتدائي 3 134
  135. 135. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Answer the following questions: Question 1: - What is the IDE mnemonic stands for? - …………………………………………………………………………………… 135
  136. 136. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Question 2: - Mention the uses of the properties window and toolbox? - …………………………………………………………………………………… …………………………………………………………………………………… …………………………………………………………………………………… …………………………………………………………………………………… 136
  137. 137. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Chapter six An introduction to controls The Windows Form Control When you create a Windows Application new project, the IDE will automatically create a "Windows Form" The Button Control 137
  138. 138. El-Zahraa Language School Computer Booklet For M البتتدائي 3 It was mentioned in the previous chapter that, primary function is to react to a click of the user and perform a task associated with that button. In other words, it executes a preprogrammed function when the event of clicking the button happens. Button's appearance and properties The Button control appears as a rectangular shape. Its face can contain text, image, or both. 138
  139. 139. El-Zahraa Language School Computer Booklet For M البتتدائي 3 139
  140. 140. El-Zahraa Language School Computer Booklet For M البتتدائي 3 140
  141. 141. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Example 1 141
  142. 142. El-Zahraa Language School Computer Booklet For M البتتدائي 3 142
  143. 143. El-Zahraa Language School Computer Booklet For M البتتدائي 3 143
  144. 144. El-Zahraa Language School Computer Booklet For M البتتدائي 3 144
  145. 145. El-Zahraa Language School Computer Booklet For M البتتدائي 3 145
  146. 146. El-Zahraa Language School Computer Booklet For M البتتدائي 3 146
  147. 147. El-Zahraa Language School Computer Booklet For M البتتدائي 3 147
  148. 148. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Solution: 148
  149. 149. El-Zahraa Language School Computer Booklet For M البتتدائي 3 149
  150. 150. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Form1.Text property to be Buttons 150
  151. 151. El-Zahraa Language School Computer Booklet For M البتتدائي 3 151
  152. 152. El-Zahraa Language School Computer Booklet For M البتتدائي 3 152
  153. 153. El-Zahraa Language School Computer Booklet For M البتتدائي 3 153
  154. 154. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Write a Click Event Handler for btnShow_Hide 154
  155. 155. El-Zahraa Language School Computer Booklet For M البتتدائي 3 155
  156. 156. El-Zahraa Language School Computer Booklet For M البتتدائي 3 g- Write a Click Event Handler for btnEnable_Disable 156
  157. 157. El-Zahraa Language School Computer Booklet For M البتتدائي 3 157
  158. 158. El-Zahraa Language School Computer Booklet For M البتتدائي 3 158
  159. 159. El-Zahraa Language School Computer Booklet For M البتتدائي 3 We can save the project using File then select save all . ** Select Start Debugging from the Debug menu or click on the Start icon on the Toolbar. 159
  160. 160. El-Zahraa Language School Computer Booklet For M البتتدائي 3 The Text Box and Label Control The following Table provides a list of commonly used Properties for Text Box control:- 160
  161. 161. El-Zahraa Language School Computer Booklet For M البتتدائي 3 161
  162. 162. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Label Control's appearance and properties 162
  163. 163. El-Zahraa Language School Computer Booklet For M البتتدائي 3 163
  164. 164. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Example Create a project that contains two Text Boxes. When you add any character in the upper Textbox it appears in the lower Tex Box in Uppercase format. The Output has to look as given in Figure. Note that text strings have a method that is called To Upper() that can convert all lowercase characters into uppercase characters. If an object X has Text property, then to change its text to uppercase using To Upper() method, you have to write the following statement : X.Text.ToUpper() Solution 164
  165. 165. El-Zahraa Language School Computer Booklet For M البتتدائي 3 165
  166. 166. El-Zahraa Language School Computer Booklet For M البتتدائي 3 The table shows the controls on the form and the values of properties that have been changed at design time. 166
  167. 167. El-Zahraa Language School Computer Booklet For M البتتدائي 3 167
  168. 168. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Write TextChanged Event Handler for TextBox txtSource Double-click on "txtSource" TextBox. This will open up the Code window and also create the first and last statements of the "TextChanged Event Handler". Methods 168
  169. 169. El-Zahraa Language School Computer Booklet For M البتتدائي 3 The following table contains a number of TextBox methods available to help the developer. 169
  170. 170. El-Zahraa Language School Computer Booklet For M البتتدائي 3 170
  171. 171. El-Zahraa Language School Computer Booklet For M البتتدائي 3 The MsgBox Statement MsgBox statement stands for “Message Box statement”. It is an alternative way to the label control for displaying information to the user. The MsgBox statement is better than the label control when it is important that the user read the information. For example, if an error has occurred, then the developer might want the user to know this and not let him/her continue until he/her is 171
  172. 172. El-Zahraa Language School Computer Booklet For M البتتدائي 3 acknowledged about this problem while in case of label control the user is free to read or ignore information displayed by it. The program execution pauses while the message box is displayed and only resumes after the user has clicked on a button on the message box. The syntax for MsgBox Statement: MsgBox( Arg1 , [Arg2], [Arg3] ) 172
  173. 173. El-Zahraa Language School Computer Booklet For M البتتدائي 3 173
  174. 174. El-Zahraa Language School Computer Booklet For M البتتدائي 3 174
  175. 175. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Note that:- · Me :- refer to the current form. · Syntax Error:- It indicates if you spell something wrong in the code window you will see a squiggly line under the problem and an error list will pop up telling what the problem is. · Intellisense Technology:- It helps the programmer by checking spelling and providing suggestions on what to include in a statement. · Empty String:- It is “” . 175
  176. 176. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Work Sheet 6 Complete : 1- The button control appears as a ……………. shape, its face can contain ………… , ……….. or the both.. 2- The button control is an …………which has a number of ……………. such ………., …………. and …………. 3- …………… property gets the background color for the control. 4- ………………… property gets the image back to the control as a wallpaper. 5- …………. sets a value indicating whether the control can respond to user interaction. 6- ……………. gets the font of the text displayed by the control. 7- …………….. gets the ground color of the control. 8- ……….. used to identify control in code. 9-…………. sets the text is what appears on the face of the button. 176
  177. 177. El-Zahraa Language School Computer Booklet For M البتتدائي 3 10- …………. sets the alignment of the text on the button control. 11- …………. sets a value indicating whether the control is displayed. 12- The prefixing of each control with ……….. letters that identifies the ……….. of control. 13- The "……… " property determines the type and size of the font but the …………….determines its color. 14- The ……………and ………………… properties deal with what you see in the background. 15- ……………… and …………… properties determine the vertical and horizontal alignments for the text and images. 16- " Text align " property to be ……………….that means that the text is vertically at the bottom but horizontally is centered. 17- To enter the code window and type a code that is executed is called ……………. , it happens when ………………. the control. 177
  178. 178. El-Zahraa Language School Computer Booklet For M البتتدائي 3 18- The blue lines which are around the controls called ………….. which can help you align your control. 19- You can align the controls by using …………… menu then ………….. 20- Each event handler begins with …………….. and ends with ………………. 21- To debug the project select ……………….. from …………… menu. 22- You can stop running the application select …………… from ………….. menu. 23- ………………is when you spell something wrong in the code window, you will see a squiggly line under the problem. 24- We can label the controls by……………object. 25- The label control is a …………….. area that can be filled with ………... 26- ……………… gets the shape of the border for the control. 27- ………. keyword is used to save time and typographical errors when you enter the code. 28- The …………….. control is a data entry control. 178
  179. 179. El-Zahraa Language School Computer Booklet For M البتتدائي 3 29- …………………….. sets whether the textbox control modifies the case of characters as they are typed. 30-……………… sets a value that indicates that the textbox control has been modified by the user. 31- ……………………. gets the character used to mask characters of a password in a single line textbox control. 32- ………………. gets the length of the text in the textbox control. 33- …………….. gets the starting point of the text selected in the textbox. 34- ………………. gets the number of characters selected in the textbox. 35- ………………. property controls the maximum number of characters the user can type. 36-………….. property prevents the user from typing into the textbox when it is set to true. 37- To type Source, press ………… key from the keyboard to under line S. 38- The result of typing txtvisual.text= " Visual Basic is " and txtvisual.AppendText(" a very nice subject ") is …………………………………….. 179
  180. 180. El-Zahraa Language School Computer Booklet For M البتتدائي 3 39- ………………. statement is better than the label when it is important that the user read the information. 40- The types of message are …………… , ……………..,…………… and …………… . Put (  ) or ( X ) : 1- The intellisense technology allows you to see all possible members for a specific object. ( ) 2- To select any member from the intellisense menu double click it. ( ) 3- There is an icon next to the member show if it is property or method. ( ) 4- We can use label control to show the answer to the question. ( ) 5- We always write event handler for the label control. ( ) 6- "" is called the "empty string ". ( ) 7- " VB" refers to the current object (form). ( ) 180
  181. 181. El-Zahraa Language School Computer Booklet For M البتتدائي 3 8- Intelisense list of the controls appears by using " Me " keyword followed by a period. ( ) 9- You can not omit "me" and the program won't run. ( ) 10- You can limit what the user types in the textbox. ( ) 11- You can write in the textbox in multiple lines. ( ) 12- The text box's multiple line must with the scroll bar. ( ) 13- You can surround the text box with a border. ( ) 14- Max length gets a value indicating whether this is a multiline textbox. ( ) 15- You can make the text in the text box is read only. ( ) 16- You can get a scroll bar appears in a multiple text box. ( ) 17- You can wrap words to the beginning of the next line when necessary in the text box. ( ) 181
  182. 182. El-Zahraa Language School Computer Booklet For M البتتدائي 3 18-In V.B language "Solution Explorer Window" contains a set of buttons which represents abbreviation of some instructions inside the menus. ( ) Choose the right answer between brackets:- 1- ( Visible – Enabled ) sets a value indicating whether the control can respond to user interaction. 2- ( Image – Forecolor – Background image ) sets the image displayed in the control as a wallpaper. 3- The prefixing for button control is ( lbl – btn ). 4- ( " btnsub " – " btnadd " – " btnmod " ) gives that it is a button that will do an addition. 5- To view the properties window select it from ( file – edit – view ) menu. 6- To view the toolbox select it from ( edit – file – view ). 182
  183. 183. El-Zahraa Language School Computer Booklet For M البتتدائي 3 7- To save the V.B net project select ( save – save all – recent ) from file menu. 8- To debug the project press ( F5 – F6 – F7 ) from the keyboard. 9- ( Label – Button – Textbox ) provides an area for the user to type while the program executes. 10- ( Max length – Multiline – Modified ) sets the maximum number of characters the user can type . 11- ( Character casting – Max length ) property will automatically change whether the user types to either uppercase or lower case. 12- The button control appears as a ( circle – rhombus – rectangle ) shape. Define:- 1. Syntax error : ……………………………………………………………………………………… …………………………………………………………………… . 183
  184. 184. El-Zahraa Language School Computer Booklet For M البتتدائي 3 2. Intellisense technology : ……………………………………………………………………………………… ………………………………………………………………………………….. . 3. Empty String : ……………………………………………………………………………………… Task:- 184
  185. 185. El-Zahraa Language School Computer Booklet For M البتتدائي 3 185
  186. 186. El-Zahraa Language School Computer Booklet For M البتتدائي 3 186
  187. 187. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Exercise: a- Is writing “btnCalculate” as a Text property for a button a good idea? Explain? …………………………………………………………………………………… …………………………………………………………………………………… …………………………………………………………………………………… b- Is there is any sense to set the Text property of a Label control, an empty string? Explain. 187
  188. 188. El-Zahraa Language School Computer Booklet For M البتتدائي 3 …………………………………………………………………………………… …………………………………………………………………………………… …………………………………………………………………………………… c- What is the advantage of the Msg Box control over the label control? …………………………………………………………………………………… …………………………………………………………………………………… …………………………………………………………………………………… 188
  189. 189. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Behaira Governorate (2009) Q.1: Your teacher asked you to rotate a shield with 50 teeth ten times. How many teeth that were rotated. Draw a flow chart that can achieve this. The answer: 189
  190. 190. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Q.2 Write the result of each pseudo code. 190
  191. 191. El-Zahraa Language School Computer Booklet For M البتتدائي 3 M=25 N=12 If(M>N) then X=M-N Else Statement2 End If X=………… B=10 BMW=13 R=2 If B<> BMW then SUM=BMW+(B)R End If SUM=………… 191
  192. 192. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Q.3 Write the pseudo code for reading the radius of a circle (r) and calculate its area and circumference. The answer: 1. …………………………… 2. …………………………………………………………………….. …………………………………………………………… …………………… ………………………. …………….. 3. ……………………………………. 4. ………………………………….. ………………………. 192
  193. 193. El-Zahraa Language School Computer Booklet For M البتتدائي 3 5. …………………………………… 6. …………………………………… 7. …………………………………… Q.4 Re-arrange the following steps to solve a problem. 1 Find relations between the variables …. 2 Name each variable …. 3 Arrange the equation according to the priority of execution …. 4 Neglect the unnecessary data …. 5 Identity the required the problem …. Q.5 Put (√ ) or (X): 1. Flow chart can replace pseudo code on solving a problem ( ). 193
  194. 194. El-Zahraa Language School Computer Booklet For M البتتدائي 3 2. Inputting and outputting have a parallelogram shape in flow chart ( ). 3. If Y=5 , M=Y2 -Y then M equal to 7 ( ). 4. Compiler converts the whole program to machine language before execution ( ). 194
  195. 195. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Alexandria Governorate (2009) Q.1 Put (√ ) or (X): 1. The programming languages are written in English with different syntax from one language to another ( ). 2. In pseudo code the “If statement” is used in selection ( ). 3. The programmer can create and test the visual basic projects through Integrated Development Environment (IDE) ( ). 4. The Visual Basic .net language has got an interpreter and a compiler ( ). 5. The pseudo code contains standard symbols that should be memorized ( ). 6. The “class” is constructed out of the “object”( ). Q.2 : choose the correct answer . 1. Hiding data inside object where other properties and methods can be accessed is called ……………………..( encapsulation – inheritance – class). 195
  196. 196. El-Zahraa Language School Computer Booklet For M البتتدائي 3 2. Integrated Development Environment (IDE) ,the “label “ can be added through ………..(toolbox – properties – solution explorer ). 3. To hide or show the “ Button” tool, use the property ………….( Name – Enabled – Visible ). 4. Actions associated with objects are called …………( properties – methods – events ). 5. The property which prevents the user from typing into the textbox is called ………….( read only - modified – text ). 6. To make the user read the information during the runtime, use ………….. ( textbox – label – msgbox ). Q.3 A.complete the following sentences: 1. Clicking the mouse inside the form window and window responds to it according to certain commands is considered …….…….. 196
  197. 197. El-Zahraa Language School Computer Booklet For M البتتدائي 3 2.Running the application within the visual studio environment press……………… on the keyboard. 3. The tool which is used to display text that can’t be altered by the user is called……………… 4. To save the application in IDE, select the command…………………from ‘file’ menu. 197
  198. 198. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Re-draw and correct the flowchart 198 start Result = Number1 + Number2 Read number1 Read number2 Output the result End ( ) ( …) ( …) ) (… ) ( ... ) (… )
  199. 199. El-Zahraa Language School Computer Booklet For M البتتدائي 3 199
  200. 200. El-Zahraa Language School Computer Booklet For M البتتدائي 3 200
  201. 201. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Menofia governorate (2009) Q.1 complete the following: 1. When a program uses ……..…….., the high- level statements are converted into equivalent machine –language statements one at a time as the program is executed. 2. …….…..means developing the programs by which it is possible to create develop computer programs. 3. MsgBox is charactarized over label in that…………………………………………………... 4. …………….…….is considered hiding for information in a class. 201
  202. 202. El-Zahraa Language School Computer Booklet For M البتتدائي 3 5. When the “ToolBox’ doesn’t appear on the screen , we display it by opening ‘view menu’,then we choose… …………. ………. Q.2 : Put (√ ) or (X): 1.When using “If statement” in pseudo code , the result shouldn’t be far from two potentialities: False – True ( ). 2. Label is used as a board to put on it the other controls( ). 3. ForeColor property gets or sets the background color for the control( ). 4.When you begin a new project , a new form is added to the project with the default name “ New Form” ( ). 5. Pseudo code is statements written in abbreviated form to show the steps required to solve a specific problem ( ). 202
  203. 203. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Q.3 : (Man was walking in the street and his name Mohamed. Suddenly the sky started raining heavily. He ran very quickly to avoid the rain. He wear heavy clothing). Complete the following table: Object Property Value of property Event Methods Man ………. …………. ………. ………. 203
  204. 204. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Q.4 :Draw a flow chart to read the age of haneen and salma, then it prints the name of the elder. 204
  205. 205. El-Zahraa Language School Computer Booklet For M البتتدائي 3 205
  206. 206. El-Zahraa Language School Computer Booklet For M البتتدائي 3 ElGharbia governorate (2009) Put (√ ) or (X): 1. Derived class inherits from the base class properties only( ). 2. The property (forecolor) is used to set the background color for the control( ). 3. The textbox is a data entry control, it provides an area for the user to type while the program executes( ). 4. When we use selection in pseudocode “ if statements” is presented, the statements listed under “Else” executed when the tested conditions is “true”( ). 206
  207. 207. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Q.2 :Choose between brackets: 1.Object Name . ………= value( method – event – property ). 2.To set the text associated with the control, the text is what appears on the face of the button, we select ……………( name - text - enabled ). 3.”Me” refers to the ……………..( current object form – button – label ). 4. To copy the contents of textbox 1 in the property text for label1 we write the order …………. 207
  208. 208. El-Zahraa Language School Computer Booklet For M البتتدائي 3 a) textbox1.text=label1.text b) label1= textbox1.text c) label1.text = textbox1.text Q.3 :A) Draw a flowchart to read the age of hany and hesham then it prints the name name of the older . 208
  209. 209. El-Zahraa Language School Computer Booklet For M البتتدائي 3 209
  210. 210. El-Zahraa Language School Computer Booklet For M البتتدائي 3 B) Write the scientific term for the following sentences: 1. It is a template used to create a new object. ( …………. ) 2. It is a predefined actions provided with an object ( ………….. ) 3. It translate the entire program into machine language before any attempt to execute it. ( …………. ) 4. It is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of abroblem.( ………….. ) 210
  211. 211. El-Zahraa Language School Computer Booklet For M البتتدائي 3 211
  212. 212. El-Zahraa Language School Computer Booklet For M البتتدائي 3 212
  213. 213. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Alexandria Governorate (2010) First Question:- Put a (√) next to the correct sentence and a (x) next to the wrong one:- 1. The flow chart helps in debugging process. ( ) 2. Using specific syntax is not one of the advantages of pseudo code. ( ) 3. The execution of the codes in the OOP model follows a sequential logic. ( ) 213
  214. 214. El-Zahraa Language School Computer Booklet For M البتتدائي 3 4. The window which helps the programmer in designing the user interface is called window designer. ( ) 5. The debugger tool is used for getting a help facility of visual basic program. ( ) 6. To create a new project, select New project from file menu. ( ) 7. The ForeColor property is used for setting the font of text displayed by the control. ( ) 8. The Textbox control provides the user a place for typing while the program is executed. ( ) 9. The MsgBox statement is used for displaying information to the user. ( ) 10.The property Visible is used for displaying and hiding the control. ( ) 214
  215. 215. El-Zahraa Language School Computer Booklet For M البتتدائي 3 Second Question:- Choose the correct answer:- 1. In the flow chart, the symbol which stands for a process operation is the symbol number……… ( , , ). 215
  216. 216. El-Zahraa Language School Computer Booklet For M البتتدائي 3 2. When the program performs a certain action a number of times, this process means…………… ( Selection , Inputs , Iteration ). 3. In the IDE, any control can be placed on the form from ……………… ( Solution explorer , ToolBox , Properties ). 4. To select the name of the control, the property …………….. is used. ( Image , Name , Text ). 5. The property which sets the character used to mask the characters of a password is …………. 216
  217. 217. El-Zahraa Language School Computer Booklet For M البتتدائي 3 ( PasswordChar , ReadOnly , MaxLength ). 6. To set the background color of the button control, the property…………is used. ( BackgroundImage , BackColor , ImageAlign ). Third Question:- Match (A) with (B), then write complete sentences :- (A) (B) 217
  218. 218. El-Zahraa Language School Computer Booklet For M البتتدائي 3 1. To determine the shape of an object , use 2. Actions caused by the user and the object responds to are 3. Actions associated with objects are called 4. Something that exists is called a) Object b) Properties c) Events d) Methods e) class 218

×