0% found this document useful (0 votes)
12 views14 pages

Prep3 Final Revision with Exams First term 2023-2024

The document outlines key concepts in problem-solving and programming using Visual Basic.net, including definitions of problems, stages of problem-solving, and the use of flowcharts and algorithms. It explains the structure and properties of various controls in a programming environment, such as forms, buttons, and textboxes, along with their functionalities. Additionally, it includes exam questions and exercises related to the content covered in the chapters.

Uploaded by

Mostafa Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views14 pages

Prep3 Final Revision with Exams First term 2023-2024

The document outlines key concepts in problem-solving and programming using Visual Basic.net, including definitions of problems, stages of problem-solving, and the use of flowcharts and algorithms. It explains the structure and properties of various controls in a programming environment, such as forms, buttons, and textboxes, along with their functionalities. Additionally, it includes exam questions and exercises related to the content covered in the chapters.

Uploaded by

Mostafa Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Computer

Final First term


Prep
Revision 3
CPS Language Schools

ICT Department
Remember that
Chapter 1 Process
A problem: A situation that requires a solution or an objective Decision
you want to achieve through following consecutive steps Flow lines
sequentially. The variable refers to a memory storage that holds a value
Problem solving: Problem Solving is the steps, activities, and The equation: C =A+B, indicates the sum of the value of A, to
processes to be done to reach an output or objective. the value of B, and stores the result in C.
Problem solving stages: The left hand side (LHS) of any equation should contain only
First: Problem Definition: Implies the identification of required one variable (output) or the solution of the equation.
outputs, available inputs and, arithmetic and logical operations to The right hand side (RHS) of the equation may contain
be executed. abstracted values or arithmetic expressions.
Second: Algorithm Preparation: Algorithm is one of the Chapter 2
methods used to solve a problem through logically arranged Visual Basic.net language: one of the high level programming
procedures (series of successive steps) languages easy to learn as its commands uses English language.
Flowcharts: It is a diagram that uses standard graphical symbols used in many applications (Windows applications or Web
to illustrate the sequence of steps required for solving a problem applications)
or specific question. Programing and computer memory: objects are created in
Some advantages of flowcharts: computer memory and every object has:
- Facilitating the reading and understanding of the problem. 1-Properties: such as (size-colour- font) of the text.
- Useful to explain the program to others. 2- Events: such as click on a command button.
- helping in documenting the program in better manner. 3- Procedures: each one contains commands and instructions
Third: Program design (into one of the programming languages) which are carried out when calling this procedure.
Fourth: Program Testing Visual Basic.net is considered:
Fifth: Program Documentation: writing all steps(given Input, Object oriented: programmes work through objects in computer
output, plan for solving the problem, drawn flowchart, Memory.
programming language used for coding , instructions, date of last Event Driven: commands and instructions are carried when
modification of the program). certain event occurs.
Documentation is beneficial when The Framework.Net provides:
1- More than one person participate in writing the program. 1- Libraries through which we create the objects,
2- Modifying the program. 2- Runtime environment (called Runtime) in computer memory
where Applications work in.
The most commonly used symbols 3- Compilers which compile commands and instructions written
Terminal (Start / End) in Programming language into machine code which the Computer
Input, Read, Get, Enter / Output, Print deals with.
IDE refers to Integrated Development Environment Common properties among different Controls such as (Name-
That help programmer to create applications ( windows – mobile Text – Forecolor – Backcolor - Right To Left…….etc.)
– web…..). Visual Studio represents IDE Properties which their effect doesn't appear on Controls until
The form: is the interface which the user deals with through you set some other properties (Right to Left Layout property
different controls such as Button, Textbox, label……etc. doesn't work unless the value Right to Left equals Yes)
Toolbox: It contains tools of controls which can be put on the properties of the form, if they are set, they are applied to
Form and can be shown in categories Controls which are placed on this Form such as (Font and
Properties window: has a group of properties which can be ForeColor properties).
adjusted through "Properties Window" The default value of the property (Text) and the property (Name)
The shown Properties in Properties Window are different is the same and it is (Form1)
according to the active part on the IDE screen. some properties which their effect doesn't appear on the Form or
Solution Explorer: There is a list of folders and files of the Controls until you run the programme like (WindowState).
projects in this part. By double clicking on the on Toolbox, the control appears on the
Chapter 3 Form in Design mode.

Default
Control name Property name Function Value
Name Name of Form used in Code Window. Form1
Text The appeared Text on the title bar of the Window. Form1
BackColor The background color of the Form.
The direction of Controls on the form Window From Right to
RightToLeft No
Left.
RightToLeftLayout The layout of Controls on the Form from right to left. False
Form: is the interface which the
user deals with through different It controls the appearance or disappearance of MinimizeBox of
MinimizeBox True
controls Form Window.
It controls the appearance or disappearance of MaximizeBox of
MaximizeBox True
Form Window.
It controls the appearance or disappearance of ControlBox of
ControlBox True
Form Window.
FormBorderStyle The Border style of Form Window.
WindowState It defines the Window State of the Form (Maximizing, Minimizing or normal).
ForeColor Choosing the ForeColor to the appeared Text on the Button
Defining (shape, size and style) of the Text font appeared on the
Button: When you click it, it Font
Button.
does a certain task.
Location The location of placing Button on the Form. 0,0
Size Defining the height and width of Button on the Form. 75,23
Label: used in showing a Text on The Size of the Label is defined automatically according to the
AutoSize True
the Form Window which can't be written Text if the Value of property equals true.
changed during programme
BorderStyle Choosing the Border Style of the Label
Runtime.
It defines the maximum number of letters which can be inserted in
Textbox: used to insert (input) MaxLength
the TextBox
data from the user during It defines a symbol used instead of written text in case we have a
programme run time. PasswordChar
password.
Multiline allows multiple lines within the text box control tool. False
Items A group of items shown in the ListBox

ListBox: Shows a list of items Sorted It defines whether the elements in the list are sorted or not. False
It defines whether it is possible to choose one item or more shown
SelectionMode
in the ListBox.
ComboBox: displays a drop- Items A group of items shown in the ComboBox
down list from which one item AutoCompleteSource It is a source of suggested items to select from.
can be selected AutoCompleteMode It defines the method of list completing process.
GroupBox: Is used to group other controls of same function together on the Form window
RadioButton: The programme
Checked It shows whether RadioButton has been chosen or not. False
user selects one alternative only.
CheckBox: used for placing some
alternatives to enable the user to Checked It shows whether CheckBox has been chosen or not. False
select One CheckBox or more
Chapter4 Event Handler: procedure which contains a code that is carried
Code Window: window through which we can write instructions out when a corresponding event occurs
and codes of the program. To create event handler for a button:
To open the (Code Window) of (Form1): 1. After opening code window
1. Make sure that the window Form is active then From the 2. select (Button1) from the Class menu drop down list, open
keyboard press (F7) (Method name) menu it displays the events associated with
2. In the (Solution Explorer) window, right click the file Button1 (click event)
(Form1.vb) and, select (View Code) from the context menu.

(1) The procedure name composed of (object name, event name).


(2) End of procedure line.
Code window is displayed as shown
(3) What causes the call of the procedure (event occurrence) .
(4) Between the two lines shown; the code that will be executed
on calling the procedure is written after the occurrence of the
Event
(5) The declaration of the class line (frmSquare)
(6) The end of (class) line.
(1) Name of the file where codes are saved.
Setting the (Properties) programmatically
(2) Name of the file where the Form window interface is saved.
You can adjust the properties using the following syntax:
(3) The declaration of Class; its name is (Form1).
(4) Space between two lines; to type codes for the Class (Form1).
(5) The end of the class (form 1).
the Code Window
(1) A drop-down menu of (Class Names) that displays the names Example:
of controls on the form. Write the following code in the appropriate event handler
(2) A drop-down menu of (Method Names) or events; associated (Button1_Click) for button1
with the item selected from the (Class Names) menu. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Label1.Text = "‫" جمهورية مصر العربية‬
End Sub
Final
Exams
GIZA GOVERNORATE
Question (1): Put () or (x):
1. (VB.Net) Programming language is a high-level programming language. ( )
2. When you click the command Button in the design mode, eight boxes appear on the borders and corners of
the command button. ( )
3. The Label control can be manually resized if the AutoSize property value is equal to True. ( )
4. The property Name is used to show certain text in the user interface window title bar. ( )
5. You can develop desktop applications or web applications using the VB.Net programming language. ( )
6. Procedure name consists of object name and event name. ( )
Question 2 Choose the correct answer from between the brackets:
1. The attributes that characterize the object such as length, name and color are called ………………………
(properties – procedures – events)
2. The property that does not show the effect of setting only in the runtime mode of the Form window is
…………………… (FormBorderStyle – WindowState – RightToLeft)
3. The control tool that can be used on the form window to allow the user to choose more than one alternative is
……………………… (GroupBox – RadioButton – CheckBox)
4. Advantages of flow charts facilitate ………………… Problem. (reading – understanding - all of the above)
5. Making sure that the program is free of error is called ………………………… (program testing – program
documentation – algorithm)
Question (3): Draw a flow chart to print the word “‫ ”ناجح‬in case the input score is greater than or equal
50 Note that:
Output: Print “‫”ناجح‬
Input: Grade X
Solution: X>= 50

Question (4): (A): Compare between:


The Label tool and the TextBox in terms of their functions:
…………………………………………………………………
…………………………………………………………………
(B): Rewrite the following sentence after correcting it to programmatically adjust the properties of the
control tools:
Property.Value = ControlName
…………………………………………………………………
(GOOD LUCK)
ISMAELIA GOVERNORATE
Question (1): Put () or (x):
1. The program documentation is writing down all the steps taken to solve a problem. ( )
2. The VB.Net language is used to producing windows applications only. ( )
3. This Code “Label1.AutoSize = True” is meant to change the size of the Label1 automatically according to
the written text inside it. ( )
4. The effect of setting the “WindowState” property of the form appears only in runtime mode. ( )
5. The control tools ListBox and ComboBox share in “Items” property. ( )
6. The property “Name” is used in showing a certain Text in the title bar of user window as name of window.
( )

11
Question (2): Complete the algorithm and a flowchart to calculate the number of years
(Y), bearing in mind that the number of months (M) is known
Note: “the number of years = the number of months ÷ 12”

Algorithm Flowchart

1. Start Start

2. …………………………… ……………………………

3. …………………………… ……………………………

4. …………………………… ……………………………

5. End
End

Question: (3): Choose the correct answer between brackets:


1. Object oriented programming language depends on ………………… (using windows Applications -- using
web Applications – objects in Computer memory),
2. Steps, activities and procedures to be done to reach an objective or an output, can be Called ……………
(problem definition – problem – problem solving)
3. Libraries, Compilers and Environment of runtime of applications are the most important Component of
……………………… (Object oriented – Event Driven – .Net Framework)
4. TextBox control tool is the only tool which has the property …… (PasswordChar – Name – AutoSize)
5. You can change the position of the Button on the form through the following processes except for ……
(drag and drop by the mouse – setting size property – setting location property)
Question (4): Complete by using the next screen:
1. The name of the project is …………………
2. We Can enter the Code window through …………………
in the shortcut menu.
3. The purpose of properties in the shortcut menu is
…………………

(GOOD LUCK)

(16) QENA GOVERNORATE 2016 - 2017


Question (1): Complete the following sentences with the appropriate:
1. The code window can be opened by pressing the ……… key on the keyboard.
2. …………………… is the steps, activities and processes to be carried out to reach the objective or outcome.
3. The .Net Framework provides ……………… from which objects are created.
4. The Name property of the form shows its name in the …………… window.
5. Clicking on the command button is considered ……………
Question (2): Choose the correct answer from the brackets:
1. ……………… is the control used to enter student gender male or female (TextBox – Form – RadioButton)
2. ………………………… is a procedure that contains code to be executed when the associated event occurs.
(Event handler – Event – Properties)
3. Flowcharts use …………… shapes to represent data to solve a problem (random – standard – illustrative)
4. The VB.Net language is ……………………………. because the commands and instructions are executed at
the occurrence of a certain event (independent – easy – event driven)
5. ……………… is used to design the user interface (Button – Form – TextBox)

12
Question (3): Put () or (x):
1. An advantage of flowcharts; they are useful in explaining the program to others. ( )
2. The ListBox displays a set of elements. ( )
3. The term “Procedures” refers to the commands and instructions that are executed when called. ( )
4. Algorithm is an objective that requires finding a solution or an objective to be reached. ( )
5. The Integrated Development Environment is called IDE. ( )
Question (4): (A): Write the scientific term for the following sentences:
1. Displays a list of files and folders of the project or projects within the solution. [……………………]
2. A tool to enter text data from the program user while the program is running. [……………………]
(B): Copy the following flowchart in the answer booklet and then complete the missing place numbers to
print the number type odd or even
Start

(1)

Yes No
(2)

(3) Print Number is odd

End
(GOOD LUCK)

Giza GOVERNORATE
First question: Put () or (x):
1. Program documentation means making sure that the program is free of errors. ( )
2. Event handler is a procedure contains code to be executed when the associated event occurs. ( )
3. To open the Code Window of the Form window press on F7 key after selecting the form. ( )
4. We can change the size of the Label tool manually if the value of the property Auto Size = True. ( )
5. We can control the position of the object Button on the form using property Size. ( )
6. VB.Net programming language is one of the high level programming languages. ( )
Second question: compare between the following: (Student may choose only two points(
1. The property Name and the property Text for the Form.
2. The selection tool RadioButton and selection tool CheckBox.
3. The property Size and property Location for the Button.
Third question: (A): Write in each shape of the flowchart what suits it from the opposite commands with
the transfer:
Start

A=2

Output " Right "


Enter B
Yes
A>B

No

End
(B) Give a value of (B) to make the condition right.

13
Fourth question: Select the correct answer to suit each sentence:
(AutoSize – VB.Net Programming language – Event – Form1 – Name – Properties window)
1. We can develop desktop applications or Web applications using ……………………
2. One of the components of the integrated development environment IDE is …………………..
3. Default value of the property Name and the property Text of the Form is …………………
4. The Property ……………… cannot be used for the TextBox
5. Click on the command Button is …………………
(GOOD LUCK)

MARSA MATROUH GOVERNORATE


Question (1): (A): Put () or (x):
1. You can use any geometric shape to represent the solution steps when drawing flowchart. ( )
2. The list of items in the Properties window varies depending on the active item in the IDE window. ( )
3. When adjusting Property programmatically; its value will be in the right side of the equation. ( )
4. Property Control Box is used to show or hide the close and the control box and maximize and minimize
boxes of the window on the form. ( )
5. The term RDE refers to the Integrated Development Environment. ( )
Question (2): Put the suitable word in the right place as follows:
(* – Program documentation – TextBox – Problem – Event – Algorithm – Text – Object)
1. A situation requires a solution or an objective you want to achieve ………………………………
2. PasswordChar is a property of the tool ……………………………………
3. To display the words "‫ "تحيا مصر‬on the Label1 tool we use the following code
Label1. ...................... = "‫"تحيا مصر‬
4. Click on the left mouse button is called …………………………
5. By recording all data about the program and its steps and who participated in it we mean …………………
Question (3): (A): Draw a flow chart to calculate the average AVG for two numbers A and B entered and
to show output:
Note: The formula for calculating the average of the two numbers AVG = (A + B) / 2
(B): Underline the different element in each of the following:
1. – – –
2. Determine output – Determine inputs – Determine mathematical processes and logical operations –
Properties.
3. Label – TextBox – Button – Click()
4. Code Window – Tool Box – Properties Window – Task Bar
Question (4): Choose the correct answer from between brackets using the following figures:
1 2 3 4

ListBox 1

2. Figure (1 – 2 – 3) is the correct form to determine the gender.


3. The property used to select more than one item in Figure 3 is (Selection – Mode – Selection mode)
4. Control tool in Figure 2 is (ComboBox – CheckBox – RadioButton).
5. Control tool Figure 4 is (ComboBox – CheckBox – RadioButton).
6. Property used to insert elements that displays inside Figure 4 is (Items – Entity – Text)
(GOOD LUCK)

14
Giza GOVERNORATE
Question (1): (A): Put () or (x):
1. We can use any graphical symbols to illustrate the sequence of steps for solving a certain problem when
drawing the flowchart. ( )
2. Event handler is a procedure that contains a code that to do when a corresponding event occurs. ( )
3. The two properties Name & Text of a Form window that have the same default value is Form1. ( )
4. Problem Solving is the steps, activities, and processes to be done to reach an output or objective. ( )
5. There are properties that its effect doesn't appear on the controlling tools only just after adjusting other
properties. ( )
6. The size of the Label tool is defined automatically according to the written Text on it if the of property
AutoSize equals False. ( )
7. Project contains a solutions or more. ( )
8. Every object is characterized by certain properties and certain behavior when a certain Event occurs on it.
( )
Question (2): Firstly: Choose the correct answer:
1. We put the expression (Y = 2X + 5) when drawing the flowchart in the symbol ……………… ( –
– )
2. The common property between two controls ListBox and ComboBox is ……………… (Text – Items –
AutoCompleteMode)
3. Procedures contains a set of …………… (object events – object properties – commands and instructions)
4. The following events occur on the button control tool except ………… (Click – Activated - DoubleClick)
Secondly: Fill in the spaces with a suitable word:
1. It is one of the methods used to solve a certain problem through a group of procedures that are logically
arranged which is called ………………
2. The characteristics which describe the object such as size, name, color and others are called ………………
3. The control tool that is used on the Form Window to group other controls of the same function together is
…………………
4. The abbreviation ...of Integrated Development Environment (Visual Studio.NET)
Question (3): Fill in the spaces with a suitable word from the following words:
Method Name – Value – RightToLeft – ControlName – Property – Class Name – Event
1. Adjusting the property of the control programmatically by using the syntax ………  ……… = ………
2. From the Code Window, It's possible to display the names of controls that on the Form Window, through a
drop down menu …………..… and it’s also possible to display the associated events of this selected item,
through the drop down menu ………….….
3. It's Possible to change the direction of the Controls that are on the form window and make it from right to
left through the Property …………………………
Question (4): Firstly: complete the following:
The stages of solving problems go through the following arranged steps:
1- (Problem Definition) 2- ………………… 3- ………………… 4- ………………… 5- ……………………
Secondly: Use the following table to fill in the spaces Inside, the flowchart with a suitable number to:
Print the result of dividing two numbers (Number1, Number2),
7
if the value of Number2 equals zero, it prints a message
“Undefined”.
1. Output "Undefined" …………
2. Is Number2 = 0 …
Yes
3. Output Result ………
4. End …
No
5. Result = Number1 / Number2
5 …………
6. Input Number1,, Number2 ……
7. Strat ……….. ..
8. Output Number1,, Number2

(GOOD LUCK) 4

15

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy