0% found this document useful (0 votes)
21 views33 pages

computer revision

The document is a computer revision guide for third-year students, covering problem-solving techniques, flowchart creation, and programming basics using Visual Basic.net. It outlines the steps of problem-solving, including problem definition, algorithm preparation, program design, testing, and documentation, along with examples of flowcharts for various mathematical operations. Additionally, it introduces Visual Basic.net as a high-level programming language, its object-oriented nature, and the components of the Integrated Development Environment (IDE).

Uploaded by

Roller Coaster
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)
21 views33 pages

computer revision

The document is a computer revision guide for third-year students, covering problem-solving techniques, flowchart creation, and programming basics using Visual Basic.net. It outlines the steps of problem-solving, including problem definition, algorithm preparation, program design, testing, and documentation, along with examples of flowcharts for various mathematical operations. Additionally, it introduces Visual Basic.net as a high-level programming language, its object-oriented nature, and the components of the Integrated Development Environment (IDE).

Uploaded by

Roller Coaster
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/ 33

El­Rowad college Computer 3rd Prep

Computer Revision
Third Prep
First Term
2020 / 2021
Name : ………………………………
Class : ………………
Chapter 1 : problem solving

Name Definition

Problem is a situation that requires a solution or an objective


A problem you want to achieve through following consecutive steps
sequentially.

Problem Problem Solving is the steps, activities, and processes to be


solving done to reach an output or objective.
Example ( packing cake )

First :Problem Definition:


Identification of required outputs, available inputs and,
arithmetic and logical operations to be executed.

Second: Algorithm Preparation:


Algorithm is one of the methods used to solve a problem
through logically arranged procedures.
One of the methods to represent algorithm is ( flowchart).

Third: Program design :


Having drawn a “Flowchart” to solve the problem, using a
Problem computer; we have to translate this flowchart into one of the
solving stages programming languages.

Fourth: Program Testing :


During writing a program we unintentionally make some
mistakes e.g. writing a minus sign (-) instead of (+). We cannot
detect errors unless we begin entering data to the program
with previously known results.

Fifth: Program Documentation


This step includes writing all steps taken for solving the
problem, This is done to have the program documented to go
back for feedback and correction.

Page [1]
Geometric symbols used in flowchart
Flowchart :

It is a diagram that uses standard graphical symbols to illustrate the


sequence of steps required for solving a problem or specific question.
Some advantages of flowcharts:
1- Facilitating the reading and understanding of the problem and
illustrating to the programmer what must be done.
2- Useful to explain the program to others
3- helping in documenting the program in better manner, especially if the
program is complicated

1- The flowchart should start with the Start symbol and end with the End
symbol.
2- A,B,C are variable names .The variable refers to a memory storage that holds a
value.
3-The equation: C =A+B, indicates the sum of the value of A, to the value of B, and
stores the result in C.
4-Entering values in A and B is done by using the term “Enter”, inside a
parallelogram, you can also use another term to get the same meaning
like “Read” or “Input”.

5-The sum equation is written inside the rectangle, as it represents an


arithmetic operation.

6-The output is expressed with a parallelogram using the term “Output”,


we can also use another term like “Print” or "output".

7-Note that flow line shows the order of an Algorithm.


Page [2]
1­ Simple Flowcharts
1- Draw flowchart to calculate the sum of two numbers entered by the user and
display the result
First: Define the problem
Output: The sum of two numbers
Input: The first number is “A “and the second number is “B”
Processing (Solution): C =A+B where the result is C

2- Draw the flowchart to solve a first degree equation Y=3x+2

Page [3]
3-Write down the Algorithm, and draw aflowchart to compute area and the perimeter of a
rectangle whose length (L) and width (W) are known, bearing in mind that the equation of the
area is : Area=L*W and that of the perimeter is : perimeter =2(L*W)
Second :Algorithm Third :Flowchart
1. start
2. enter value of R
3. processing Area=L*W
perimeter=2(L*W)
4. output Area -Perimeter
5. end

4-Write down the Algorithm, and draw a flowchart to calculate the area of a circle whose radius
“R” is known , bearing in mind that the equation of the area of circle is : Area=3.14*R*R.
Algorithm Flowchart

1. start
2. enter value of R
3. processing Area=3.14*R*R
4. print result Area
5. end

5- Write down the Algorithm, and draw a flowchart to calculate the number of years,
bearing in mind that the number of months is known.
Algorithm flowchart
1. start
2. enter value of Y
3. processing Y=M/12
4. print result Y
5. end

Page [4]
2­ Branching Flowcharts

5-Draw the flowchart to print the word “successful” in the case of the degree input is greater
than or equal to 50.

6: Draw the flowchart for a program that will calculate the division of two numbers. If the
divisor equals (zero), the message displays “undefined”.

Page [5]
7: Draw aflowchart for aprogram that obtains anumber from the user. Determine the number
type (even or odd)

8: Draw the flowchart to get a temperature degree , and print out the following results “greater
than zero “ – “less than zero” or “equal zero “

Page [6]
9: Write down the algorithm, and draw aflowchart to center two unequal numbers, then print
the largest is….? And the smallest number is ….?

Second :Algorithm Third :Flowchart


1. start
2. enter value of X ,Y
3. if X>Y then
3- 1 the largest number is X
3- 2 the smallest number is Y
4.Else
4- 1 the largest number is Y
4- 2 the smallest number is x
5. end the larg est number is x
the smallest number is Y

the largest number is Y


the smallest number is x

10: The following flowchart is used to calculate the Area of a circle with radius “R”. Redraw the
flowchart so that it displays the message “not allowed” and exist from the program (when the
value of “R” is negative).

Flowchart Modified Flowchart

Table (1-8) Flowchart to calculate the area of a circle

Page [7]
3­ Looping Flowcharts
11: Print out the numbers from 1 to 3
First: Define the problem
Output: print numbers from 1 to 3
Input: number M
Solution: print number M and increment it by 1 then continue printing until the value of
M become greater than 3

12-Print the multiplication table of number 3.

Page [8]
13-Print the multiplication table of entered number J
Algorithm flowchart
1- start
2-
3- enter N
4- J=1

if J<=12 then
4-1- print J*N
4-2- J=J+1
4-3- go to step 4
5- end

14-print the even numbers from 1 to 10


algorithm flowchart
1 - start
2 - M=2

3 -if
M<=10 then
3-1- print M
3-2- M=M+2
3-3- go to step 3
4 - end

Page [9]
15- print out the sum of integer numbers from 1 to 3

Page [10]
16- print out the sum of odd numbers from 1 to 10.
Algorithm flowchart
1- start
2- N=1
3-sum=0
4-sum=sum+N
5- N=N+2
6- if N>10 then
6-1- print sum
7-Else
7-1- go to step 4
8-end

17- print the sum of even numbers from 1 to 10


Algorithm flowchart
1- start
2- N=2
3-sum=0
4-sum=sum+N
5- N=N+2
6- if N>10 then
6-1- print sum
7-Else
7-1- go to step 4
8-end

Page [11]
Chapter 2
Introduction to Visual Basic.net

In this chapter, you will deal with Visual Basic.net program which will enable you to
convert the steps of solving a problem into programme codes that can be carried out.
It is one of the high level programming languages and
designed to be easy to learn as its commands and instructions
Language of use English language vocabulary and it can be used in many
visual basic applications such as:
1- Windows applications
2- Web applications
Commands and instructions which are written in Visual
Basic.net enable you to create objects in computer memory and
every object has:
1- Properties such as (size-color- font) of the text written on the
program interface.
Programming 2- Events such as click on a command button.
and computer 3- Procedures, each one contains commands and instructions
memory which are carried out when calling this procedure.
So, the Visual Basic.net is considered:
Object oriented as its programs work through objects in
computer Memory.
Event Driven as commands and instructions are carried out as
soon as certain event
The Framework.Net provides the following:
* Libraries through which we create the objects,
* Runtime environment (called Runtime) in computer memory
Framework .net where Applications produced by the language of Visual
Basic.net language work in.
* Compilers which compile commands and instructions written
in Programming language into machine code which the
Computer deals with.
The programmer of Visual Basic.net needs Integrated
Development Environment ( IDE ) which provides tools and
Visual basic.net merits to the programmer that help him create applications (
and IDE windows – mobile – web…..).

Page [12]
The form is the interface which the user deals with through
different controls such as( Button, Textbox, label……)etc.

Form

It contains tools of controls which can be put on the Form and


can be shown in categories as in Figure

Toolbox

Some of these categories include:


*Common Controls
Some Common Controls
ListBox
Label
TextBox
Button
RadioButton
CheckBox
ComboBox
*Menus & Toolbars

Page [13]
Each tool of the above Common Controls has a group of
properties which can be adjusted through "Properties Window"

Properties
window

There is a list of folders and files of the projects in this part as


shown in Figure

Solution explore

Page [14]
Chapter 3
Form properties The form is the interface which the user deals with through
different controls such as( Button, Textbox, label……)etc.

Name The effect of the property

Name In design mode( in code )


Text In design mode and runtime mode
Color In design mode and runtime mode
RightToLeft ( yes or no )In design mode and runtime mode
RightToLeftLayout (True or false ) In design mode and runtime mode
MaximizeBox (true or false )In design mode and runtime mode
ControlBox (true or false )In design mode and runtime mode
FormBorderStyle In design mode and runtime mode
WindowState In runtime mode
Notes:
 There are common properties among different Controls such as (Name-Text – Forecolor –
Backcolor - Right To Left…….etc.)
 There are some properties which their effect doesn't appear on Controls until you set
some other properties , for example the Right to Left Layout property doesn't work unless
the value Right to Left equals Yes.
 There are properties of the form, if they are set, they are applied to Controls which are
placed on this Form such as font and ForeColor properties.
 The default value of the property (Text) and the property (Name) is the same and it is
(Form1).
 When you set some properties, the effect of setting appears directly on the Form in design
mode of the program.
 There are some properties which their effect doesn't appear on the Form or Controls until
you run the program.

Page [15]
Button
It is one of Controls which can be placed on the Form. When you click it, it does a certain
task. Placing the Button on the form.
By double clicking on the Button control on Toolbox, the Button appears on the Form in
Design mode

Note that when you click on the command button in the design
mode:

Eight squares appear on the borders of the Button.


You can change the size of the Button by using the process of drag and drop using the
pointer of the mouse through the eight squares.
You can change the location of Button by using the process of drag and drop after moving
the mouse pointer until it turns into a shape with four heads.

Label It is a tool used in showing a Text on the Form Window which can't be changed
during program Runtime.
Some distinctive properties of the Label

Notice: You can change the size of Label manually by using the process of drag and drop
when the Value of the property AutoSize is false through the eight handles in design mode
only and its effect appears in design mode and runtime mode.

Page [16]
TextBox
It is a tool used to insert (input) data from the user during program in run time.
Some distinctive properties of the Textbox:

property Appearance mode of property effect


Maxlength In design mode and runtime mode
Password Chart In design mode and runtime mode
Multiline ( true or false )In design mode and runtime mode
ListBox:
Shows a list of items
Some distinctive properties of the ListBox:

property Appearance mode of property effect


Items In design mode and runtime mode
SelectionMode In runtime mode
Sorted ( true or false )In design mode and runtime mode

Page [17]
ComboBox
A ComboBox control displays a drop-down list from which one item can be selected.
Some distinctive properties of the ComboBox:

Here is the effect of setting some properties on the ComboBox:

property Appearance mode of property effect


Items In runtime mode
AutoCompleteMode In runtime mode
AutoCompleteSource In runtime mode

GroupBox
Is used to group other controls of same function together on the Form window
Here is the effect of setting some properties on the GroupBox

property Appearance mode of property effect


Text In design mode and runtime mode
Forecolor In design mode and runtime mode
RightToLeft ( yes or no )In design mode and runtime mode
RadioButton
The programme user selects one alternative only.
Some distinctive properties of the ListBox

Checkbox
It is used for placing some alternatives to enable the user to select one CheckBox or more
During program runtime.

Page [18]
Code Window
Visual Basic.NET language provides a window through which we can write instructions and
codes of the program called (code window)
To open the (Code Window) of (Form1) perform the following:
1. Make sure that the window Form is active
2. From the keyboard press (F7)
The Code window is displayed as shown

The numbers shown indicate:


(1) Name of the file where codes are saved.
(2) Name of the file where the Form window interface is saved.
(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).

Event Handler
It’s a procedure which contains a code that is carried out when a corresponding event
occurs..
To create event handler do the following steps:
1. In the (Solution Explorer) window, right click the file (Form1.vb) and, select (View
Code) from the context menu
When choosing (View Code) the following figure appears

The numbers shown in figure indicate:


(1) A drop-down menu of (Class Names) that displays the names of controls on the form.
(2) A drop-down menu of (Method Names) or events; associated with the item selected from the
(Class Names) menu.

Page [19]
5
4
1
2 3
6
The numbers shown in figure indicate:
(1) The procedure name composed of (object name, event name).
(2) End of procedure line.
(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 declara on of the class line (frmSquare)
(6) The end of (class) line.
Setting the (Properties) programmatically.
In chapter 3, we have already set the properties through properties window. You can adjust
the properties using the following syntax:

Example:
Write the following code in the appropriate event handler (Button1_Click) for button1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Label1.Text = "‫" جمهورية مصر العربية‬


Label1.ForeColor = Color.REd
Label1.BackColor = Color.Blue
Label1.Font = New Font("Snap ITC", 20)
Label1.Visible = True
Label1.Enabled = True
Label1.Autosize = True
End Sub
Page [20]
El­Rowad college Computer 3rd Prep

Questions answers
Chapter (1,2,3)
Page [21]
Computer and information technology Third grade preparatory First semester 2020/2021

Questions lesson one


First: Put () in front of the correct sentence and () in front of the wrong one:
1 Flowcharts use standard symbols and lines to represent a problem algorithm. )√ (
2 You can use any Geometric shape to represent Algorithm when drawing flowcharts. )× (
3 The symbol is used to represent start and end of flowchart. )√ (
4 The rectangle symbol is used to represent the data input process. ) ×(
5 )√(
The symbol is used to represent a decision process in flowcharts.
6 The problem means that an objective or output is required to reach. )√ (
7 Preparing a cup of tea is an example of a problem. ) √(
8 Problem solving is the steps, activities, and processes to be done to reach an output or )√(
objective.
9 The program documentation is a set of procedures arranged logically for solving a specific )× (
problem.
10 The program testing is writing down all the steps taken to solve a problem. ) × (
11 Documenting the program means making sure that the program is free of errors. ) × (
12 Algorithm is a set of procedures arranged logically for solving a specific problem. ) √ (
13 The program documentation is writing down all the steps taken to solve a problem. ) √ (
14 Testing the program means making sure that the program is free of errors. ) √ (
15 Flowcharts are schematic representations which depend on drawing some standard symbols ) √ (
to clarify the order of procedures to solve a problem.
16 Flowcharts help to facilitate understanding of the problem, analyze and convert it to a )√(
program.

Second: Choose the appropriate answer to complete each phrase of the following:
1- Steps, activities and procedures to be done to reach an objective or an output - can be called:
a. problem definition b. problem c. problem solving
2- On drawing flowcharts we use:
a. standard symbols and lines b. all geometric figures c. one geometric figure
3- A set of procedures arranged logically for solving a specific problem –can be called:
a. problem b. algorithm c. program testing
4- Making sure that the program is free of errors –can be called:
a. program testing b. program documentation c. algorithm
5- Writing down all the steps taken to solve a problem errors–can be called:
a. program documentation b. program testing c. flowcharts
Problem-solving approach includes many terminologies, the terminology that expresses the
preparation of a cup juice is:
a. Flowchart b. algorithm c. problem
7- Problem-solving approach includes many of the terminologies, the terminology that expresses
the mathematical problem is:
a. Algorithm b. problem c. program design

Page [22]
Computer and information technology Third grade preparatory First semester 2020/2021
8- A schematic representation that depends on drawing some standard symbols to clarify the
order of procedures to solve a problem can be called:
a. Problem b. algorithm c. flowchart
9- In the following flowchart: The number of iterations (print the value of M) is:
a- 2 b- 3 c- 4

10­In Flowchart of the previous question, the value of M after the end of the iterativeloop equals:
a. 2 b- 3 c- 4

Question 3: Write down the scientific term:


1. /ƚŝƐĂĚŝĂŐƌĂŵƚŚĂƚƵƐĞƐƐƚĂŶĚĂƌĚŐƌĂƉŚŝĐĂůƐLJŵďŽůƐ Flowchart

2. /ƐĂƐŝƚƵĂƚŝŽŶƚŚĂƚƌĞƋƵŝƌĞƐĂƐŽůƵƚŝŽŶŽƌĂŶŽďũĞĐƚŝǀĞLJŽƵǁĂŶƚƚŽĂĐŚŝĞǀĞ WƌŽďůĞŵ

3. A group of logically arranged steps to reach the goal Algorithm

4. Making sure that the program is free of errors Program testing

5. Writing down all the steps taken to solve a problem error Documentation

Question 4 The problem solving stages are


a. Problem definition
b. Algorithm
c. Program design
d. ProgramTesting
e. ProgramDocumentation
Page [23]
Computer and information technology Third grade preparatory First semester 2020/2021

Chapter 2: Visual basic.net


Questions ‐ 1
First: Put ( √ ) in front of the correct sentence and (X) in front of the wrong one:
1 The VB.net language is one of the high level languages. )√ (
2 The VB.net language is one of Event Driven languages. )√ (
3 The VB.net language is the only high level language. )× (
4 The VB.net language is considered a high level language because it is easy to learn. )√(
5 The VB.net language is used in producing Windows applications and Web applications. )√ (
6 The VB.net language is used in producing Web applications only. )× (
7 The VB.net language can't be used in producing Windows applications ) ×(
8 Every Object is characterized by certain properties and certain behavior when a certain event ) √(
occurs on it.
9 Events and procedures which belong to any object in VB.net language are called properties. ) ×(
10 The name, the size and color of an object are all samples of events that can occur to the ) ×(
object in VB.net language.
11 The name, the size and color of an object are all samples of properties of some objects in )√ (
VB.net language.
12 The Events are the commands and instructions which are carried out when a certain )× (
procedure occurs to the object in VB.net language.
13 The procedures are the commands and instructions which are carried out when a certain )× (
procedure occurs to the object in VB.net language.
14 Pressing click and D-click are samples of some events that can occur to an object in VB.net )√ (
language.
15 Framework.net contains Compilers, libraries and runtime environment )√ (
16 Compilers in Framework. Net are considered the environment of runtime for applications )× (
which are produced in VB.net language.
17 Compilers are programmes that translate commands and instructions written by the )√ (
programmer from the high level language into machine language.
18 Object oriented programming languages are the languages which work through objects that )√ (
carry out procedures when a certain event occurs to them.
19 All programming languages which carry out a group of commands and instructions are )× (
considered as Event Driven languages.
20 Visual Studio is considered IDE because it includes a group of tools, elements and )√ (
characteristics necessary to produce applications.

Page [24]
Computer and information technology Third grade preparatory First semester 2020\2021

Second: Choose the correct answer to complete each statement:


1-Object Oriented programming language depends on:
a- using Windows applications.
b- using Web applications
c- objects in computer memory.

2­You can produce Windows applications or Web applications by using:


a-Objects in computer memory
b-VB.net language
c- Properties and Events
3- Characteristics which describe the object such as size, name and colour are called:
a-Properties
b-procedures
c-Events
4-Click on Button is:
a-property
b-procedure
c-Event
5-Commands and instructions which we want to carry out are called:
a-properties
b-producers
c-Events
6- The Properties term refers to:
a- Features that describe the object.
b-Events that can occur to the object.
c- Commands and instructions that are carried out.
7-The Events term refers to :
a- properties that describe the object.
b-Events that can occur to the object.
c- Commands and instructions that are carried out.
8-The Procedures term refers to:
a-properties that describe the object.
b-Events that can occur to the object.
c- Commands and instructions that are carried out.
9-libraries, Compilers and Environment of runtime of applications are the most important components of:
a-Object Oriented.
b-Event Driven.
c-Framework.net.
10- IDE is called:
a-Visual Basic.net
b-Visual Studio.
c-Framwork.net.

Page [25]
Questions Chapter 3
First: Put ( √ ) in front of the correct sentence and (X) in front of the wrong one:
1 The function of the property RightToLeft of the Form is to define the direction of ) √(
Controls from right to left.
2 The function of the property RightToLeft of the Form is to define the state of the ) ×(
Form on the screen in a position of Maximizing or Minimizing.
3 Setting the property ControlBox of the Form can control the Form in a position of ) ×(
Maximizing during programme.runtime.
4 The property “Name" is used in showing a certain Text in the title bar of user window )×(
a name of the window.
5 The property Text is used in showing a certain text the title bar of of user window. )√(
6 Setting some properties of the Form is applied to Controls which are placed on the )√ (
Form.
7 The effect of setting the Window State property of the form appears only in runtime )√(
mode
8 You can change the location of Command Button on the Form through Size property. ) ×(
9 You can change the location of Command Button on the Form through Location ) √(
property.
10 Placing Controls automatically on the Form on the co-ordinate (0-0) is in the middle ) ×(
of the Form.
11 You can change the size of Label manually if Auto Size=true ) ×(
12 You can change the size of Label manually if Auto Size=false )√ (
13 "Textbox control tool: is the only tool which has the property Auto Size ) ×(
14 ListBox and ComboBox share in "Item " property. ) √(
15 ListBox and andComboBox share in " Suggest " property ) ×(
16 GroupBox is the tool used in contain a group of controls, these controls have the same ) √(
function on the Form.
17 ListBox is the tool used in contain a group of controls, these controls have the same ) ×(
function on the Form.
18 CheckBox can be used on the Form to choose the Gender of student male or female. ) ×(
19 Combobox is the control tool that allows the user to choose one element of several ) √(
elements in the smallest possible space on the form window

Page [26]
Second: Choose the correct answer to complete each statement:-
1- The function of "Right to Left" property of the Form is:
a- define the direction of Control tools from Right to Left.
b- define whether the layout of ControlTools on the Form is from Right to Left.
c-define the state of the window in a state of maximaizing or minimaizing.
2- ControlBox property of the Form is helping to:
a- showing or hiding of Maximizing Box.
b- control the appearance of the Form whether it is in a position of Minimaizing / Maximaizing / Normal.
c-Control the appearance or disappearance of ControlBox in the Form.
3-The used property in showing a certain Text on the titlebar of a Form is :
a- Name b-Text c-FormBorderStyle
4-On setting some properties of the Form, they are applied on Control Tools
Which are placed on the Form (one of them is):
a-Name b-Forecolor c-Text
5-The effect of setting this property doesn't appear unless in runtime mode (This property is):
a-FormBorderStyle b-WindowState c-RightToLeft
6-The property which is responsible for the size, shape and effect of the Text font shown on the Button is
a-Backcolor b-Forecolor c-Font
7-You can change the position of the Button on the Form through the following processes except for :
a-drag and drop by the mouse
b-setting Size property
c-setting Location property
8-You can change the position of the Button on the Form through :
a. Setting Location property
b-setting Size property
c-the eight squares around the Button
9-On inserting any Control Tool by pressing D-Click from the Toolbox on the Form , the appropriate
place to be shown is :
a-coordinate (0,0)
b-the middle of the Form
c-the position of Control Tool is different according to the size of the Form
10-The size of Label is defined automatically on the Form if the property is:
a-Auto Size = False b- Border Style= Fixed Single c- Auto Size=True.
11-You can change the size of control "Label" manually if the property is :
a- Auto Size = False- b- Border Style= Fixed Single c- Auto Size=True-

Page [27]
12-The following properties belong to TextBox except for:
a-AutoSize b-MultiLine c-MaxLength
13-The Object TextBox is marked by one property :
a-AutoSize b-Name c-PasswordChart
14-The right value which can be used to set the PasswordChart of the TextBoxis :
a-Pw b-True c-*
15-The ListBox and ComboBox share in this property :
a-Suggest b-Item c-SelectionMode
16-The ControlTool which is used in containing a group of controls that have the same function on the Form is:
a-ComboBox b-ListBox c-GroupBox
17-The Control tool which can be used on the Form to choose Gender of the student "male"or "female" is:
a-RadioButton b-CheckBox c-TextBox
18-The ControlTool which can be used on the Form and allows the user to choose more than one
alternatives is :
a-RadioButton b-GroupBox c-CheckBox
19-The ControlTool which allows the user to choose one item of 15
in the smallest possible area on the Form is:
a-ComboBox b-ListBox c-RadioBox

Page [28]
Chapter 4 code window

Quations :
1) Complete the table with a number from 1 to 5 using the next screen to express every number to
what it refers to:
NO. Indicate
(…5.) The end of class
(…4.) The place to write the codes of the class
(2….) The name of the file that saves the design
of the form interface
(…1.) The name of the file that saves the code
(3….) The start of the class

2) Complete the table using the next screen:


NO. Indicates
1 Name of the file where codes are saved.
Name of the file where the Form window
2
interface is saved
3 The declaration of Class; its name is (Form1).
Space between two lines; to type codes for the
4
Class (Form1)
5 The end of the class (form 1).
3) complete the table using the next screen :
NO. Indicates
1 The name of the solution is ……shapes…………
2 The name of the project is……shapes…………
We can enter the code window more than one way,
through :
3
 Command view code in the shortcut menu context
 function key …F7…….
The purpose of properties in the shortcut menu is
4
……format the properties of the selected object…..

Page [29]
4) Complete the table using the following screen :
NO. Indicates
A drop-down menu of (Class Names) that displays the
1
names of controls on the form
2 Form Name (frmsquare)
A drop-down menu of (Method Names) or events; associated
3
with the item selected from the (Class Names) menu.

1- The number of forms is ………one……………


2- number (1) refers to … menu of (Method Names) or events; associated with the item selected….
3- number (2) refers to … menu of (Class Names) that displays the names of controls on the form..…….
4- List three different control tools from the previous screen
 …btncalculate…..
 ……blblength…..
 ……txtlength..
5- The name of the class is ……frmsquare………..

5) Answer the question using the following screen :

a- From the previous screen write 3 different events :…click…… …double click… …AutoSizeChanged……
b- frmSquare refers to ……class name…….
c- The events in the window belong to the control ………Button1………..
d- The name of the active tab in the window is …frmsquare.Vb…

Page [30]
6) Complete the table using the following screen :

indicatesNO.

NO. Indicates
1 The procedure name composed of (object name, event name).
2 End of procedure line.
3 What causes the call of the procedure (event occurrence) .
Between the two lines shown; the code that will be executed on
4
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.


7) Explain the components of the general syntax to adjust the properties of controls programmatically:
ControlName.Property = Value
The control or the … The property….. …… The value………
object name…….

8) Explain the following codes through your pervious study for the general syntax to adjust the
properties of control programmatically :
(A) Button2.Text = "END"
………write text END on the face of tool………….
(B) Label1.AutoSize = True
……Change size of Label1 automatically depend on text written inside………….

Page [31]
Page [32]

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