Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has...

55
1 -To help the computer to execute the required operation and the input to get information or result , we Should give it the steps which are needed to be executed. ( We can display the computer as in the following figure) Output (Arithmetical or Logical operations) Input *Programming:- It is a form of problem solving, or it is the process of creating and typing commands in the programming language. *Program:- it is a set of instructions or commands which are typed in a certain form in one of the programming languages for solving the problems. *Programming languages:- They are languages which are written in English letters but in different rules which change from one language to another. *Problem: It is an aim or output which is needed to be achieved through applying a set of steps in a certain order. *Problem solving:- It means a achieving the required or output through a set of ordered steps and certain inputs. Introduction Data Processing Information

Transcript of Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has...

Page 1: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

1

1

x

-To help the computer to execute the required operation and the input to get information or result , we Should give it the steps which are needed to be executed.

( We can display the computer as in the following figure)

Output (Arithmetical or Logical operations) Input

*Programming:-

It is a form of problem solving, or it is the process of creating and typing commands in the programming language.

*Program:-

it is a set of instructions or commands which are typed in a certain form in one of the programming languages for solving the problems.

*Programming languages:-

They are languages which are written in English letters but in different rules which change from one language to another.

*Problem:

It is an aim or output which is needed to be achieved through applying a set of steps in a certain order.

*Problem solving:-

It means a achieving the required or output through a set of ordered steps and certain inputs.

Introduction

Data Processing Information

Page 2: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

2

2

1-Problem definition.

2- Preparing the algorithm solving steps.

3-Program Design.

4- Program Testing.

5-Program documentation.

-define the needed outputs and available inputs and the arithmetic or logical processing operations.

-It is a set of logically ordered steps which are applied for achieving the required aim by using certain inputs.

-To solve the problem by using the computer, it is compiled to a programming language.

-Testing the program validity and correcting its errors by entering previously Known data we know its outputs.

-By recording all what was achieved and used in the program (Algorithm –Inputs –Outputs-Flowchart-Programming language – Date of program creation –Date of the last modification – Determine the participant in the program ).

*Steps of problem solving by using computer:-

Problem definition:-

Program documentation:-

Program Design:-

Algorithm:

Program Testing:-

Page 3: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

3

3

*Put (√ ) or ( × ):- 1-The Algorithm is the first stage of problem solving . ( )

2-It is wrong to type a program without preparing algorithm . ( )

3-the problem which has a known result is used interesting the program validity. ( ) 4- Program it is the process of creating and typing commands in the programming language . ( )

5-Algorithm is a set of logically ordered steps which are applied for achieving the required aim by using certain inputs ( )

6- To use data we should process them first ( )

*Give the suitable term to the following statements : 1-Achieving the needed output through a set of ordered steps and certain inputs. (………………………………………)

2-Aset of instructions which are written in one of the programming languages to represent the steps of the problem solving clearly . (………………………………………)

3- To record all the applied steps for problem solving . (……………………………………..)

4-To establish and type instructions in the programming language.(………..……………..)

5-Arequired output by applying a set of orderly arranged steps.(……………..…………….)

6- They are languages which are written in English letters but in different rules. (………..……………….………….)

*Re-arrange the following steps for problems solving:- -Design the program on computer. ( ) -Program Documentation. ( ) -Test the program validity and correct errors . ( ) -Define the problem. ( ) -Prepare the Algorithm solving steps. ( )

Page 4: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

4

4

*Underline the correct answer:

1-The first stage of solving problem.

(solution steps – define problem – determine input)

2-The objective or the specific output that we want to attention. (Problem – problem solving – Algorithm )

3-The last step in the problem solving is ( Test program validity – program documentation – prepare Algorithm )

4-The computer converts data in to information by (Programming – converting – processing )

*Re-write the following sentences after correcting the underlined:-

o a achieve is a set of logically ordered steps which are applied tPrograming language -1the required aim.

……………………………………………………………………………………………………………………………………. of the processing them . informationWe can use -2

……………………………………………………………………………………………………………………………………

3-The data of a problem with previously known outputs used for deleting errors in the . Program documentation

…………………………………………………………………………………………………………………………………….

represent achieving a certain , needed aim or output through sequent Algorithm-4 Steps and activities and certain inputs.

………………………………………………………………………………………………………………………………………

Page 5: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

5

5

-Is a diagram that uses standard graphical symbols ; to illustrate the sequence of steps required for solving a problem or specific question.

1-Facilitate understanding to problem.

2-Reminder the programmer and define the problem.

3-Define the steps of solution to the others easily.

4-For the better documentation of program.

-Terminal

- Input/output

-Process

-Decision

-Flow line

1-The flowchart should have clear symbols, content and to have one start and one end.

2-The flowchart should begin with symbol and end with or symbol.

3-to indicate to entering data (input)we can use Enter ,Input or Read and we can use any other word with the same meaning.

4-To indicate to output the result (output),we can use Output or Print and we can use any other word with the same meaning.

5-Process symbol takes the rectangular shape and used for typing operation as

arithmetic operation.

Flowchart

The benefits of the flowchart

The most commonly used symbols in flowchart

Guideline for drawing the flowchart

s

Page 6: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

6

6

6-Desition symbol takes the rhombus shape and used to indicate to the question

( Is/Are) to select from two alternatives.

7-Flow line symbol takes the shape of an arrow which may be in any of the four directions and it used to connect the symbol together and to display the sequence of the steps.

-There are some problem which need using the (Decision ) symbol which indicate that there is a question or choice. There are mostly two options Yes / No .

-There are some problem need using the ( Loop ) to representing the repetition of a

certain steps or more by using flowchart.

-It is a statement or command in which a certain value is stored in a certain location or like a store in the memory (variable).

*Note:-

a)The expresions on the left side of any equations should contain only one variable , the value of this variable will be the (out put) or the solution o9f the equation.

b)The expresions on the right side of equation may contain values or arithmatic expresions that have one or variable (in puts).

-It means a store in the computer memory that has a certain title and its value change during the program.

*we can deal with three types of flowchart :- 1- Simple flowchart 2- the use of branching ( Decision ) in flowchart 3- the use of loop in flowchart

*Flowchart:- 1-Simple flowchart. 2-The use of Branching (Decision) in flowchart. 3-The use of loop in flowchart.

Note

Assignment statement:-

Variable:-

Page 7: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

7

7

Page 8: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

8

8

Page 9: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

9

9

2-

Page 10: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

11

11

The use of Branching (Decision) in flowchart.

Most problems include a decision point, such as yes/no question, where two possible answers are available a “yes” and a “no”, in a flowchart the decision point has two paths (branches), each presents one of the possible answers, you can also find more than two answers.

Page 11: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

11

11

8

Page 12: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

12

12

3-The use of loop in flowchart.

Page 13: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

13

13

Page 14: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

14

14

*Put ( √ )or( × ) :-

1-Flowchart facilities converting the steps of a problem solving in a program through one of the programming language. ( )

2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( )

3-The flowchart must be complete and clear. ( )

4-We can use any geometric shape or symbol in drawing the flowchart . ( )

5-We can't use the flow line to return to a previous step in the flowchart . ( )

6-To represent the input in the flowchart ,use Enter or print. ( )

7- R =R+2 is an arithmetic operation not an Assignment statement. ( )

8-Input is used with the process symbol in the flowchart . ( )

9-Defining the problem facilitates drawing the flowchart. ( )

10-Decision symbol couldn’t have more than 2 solutions. ( )

11-The symbol is used in the flowchart to compare two values. ( )

12- Flowchart can be drawn using software only and can't be drawn on appear. ( )

13-The symbol is used to represent both the start and end. ( )

14-The rectangle symbol represents only one processing operation. ( )

15-The symbol is used when a question has more than one alternative . ( )

16-The flow of steps will always be from top to bottom or from left to right. ( )

*Complete the following sentences from the brackets:-

(Flow line- Assignment statement – Terminal – Decision )

1-………………………symbol is used in the start and end of the flowchart.

2-……………………….symbol is used to represent the sequence of the flowchart steps.

3-……………………….the right side of the equation contain the value which needs to be stored.

4-……………………….symbol is used to connect the symbols of the chart.

5-……………………….symbol is used to represent a question with (yes / No ) answer.

Page 15: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

15

15

*Draw the suitable symbol in the following table:-

Symbol statement

B < A 1 H = R + 2 2 Read N1 , N2 3 Start 4 Output sum 5

*Match from (A) with the suitable in (B):-

Significance symbol

To represent a statement , question or choice. 1

To type an Assignment statement. 2

To connect the chart symbols together . 3

To enter data. 4

To represent the start and end of the problem solving steps.

5

Page 16: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

16

16

First: State whether the following statements are true (√) or false (X)

1- Flowcharts use symbols and lines with arrows to represent an Algorithm .( )

2- You can use any Geometric shape to represent Algorithms when drawing flowcharts.( )

3- Flowcharts can be drawn using software only and can’t be drawn on paper.( )

4- The symbol …………….is used to represent both the start and the end .( )

5- The rectangle symbol represents only one processing operation .( )

6- The flow of steps will always be from top to bottom or from left to right.( )

7- The symbol is used when a question has more than one alternative.( )

8- Two paths (lines)should come out from the diamond symbol .( )

9- The line with an arrow (flow line) should be from left to right or from top to bottom.( )

10- The (Algorithm) is the first stage of Problem Solving .( )

Second: Inside each symbol of the following Flowcharts write the appropriate instructions.

Page 17: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

17

17

2- The Figure shows a flowchart that calculates the interest value for the balance

3- The Figure shows a flow chart for calculating the division of two numbers

4- The Figure shows a flow chart to find the maximum number among two numbers In the case of equality output the message "equal" .

Page 18: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

18

18

5- The Figure shows a flow chart that will print even integer numbers from 1 and 10

Page 19: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

19

19

*Visual basic.Net:- -is just one of the languages in visual studio.Net package that includes other languages ,such as C# and J#. -visual basic .Net is an object language that develops event driven windows and web applications.

-A set of rules, symbols and words you can use to write instructions and construct a computer program ; according to the programming language used. Instructions will be translated to machine language for being executed . Note:- a)Visual basic .Net is used to create Windows applications. -windows applications has a Graphical User Interface(GUI) and appears in window, like paint ,Notepad ,calculator , internet browser...etc Notice that all windows application have a graphical interface that share some common characteristics like max , min button and saving or opening files. b)Windows applications are event driven application. -when using windows application you do an action(event) so writing programs using programming languages is important for responding to certain event. c)Visual Basic .Net is an Object Oriented Language. -in V.B.Net every thing depends on objects which have the following attributes(properties, events and methods)

Programming language

*Visual Basic . Net programming language

Page 20: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

21

21

- It is the basic constructive element in object oriented programming language Created from a defined class

It is the blue print / template , From which the individual objects are created . It has ( Properties , methods and events ) which any created class takes .

-Each object has a set of properties , methods and events a required from class.

They describe the object and form its shape and characteristics . -

Such as: Name , Color , Width , Length , ect….

They are the action or tasks which the object can perform .-

Such as : ( Close ) and ( Show ) the program window ( Form )

-They represent the actions to be performed on objects and are responded by executing the command .

Notice:-

1)The (class) implies a definition for the (Object).

2)The (object)exists only when an instance of the class is created.

3) You can create several objects from the class.

4)A place in the memory is reserved for each object in V.B.Net when it is created.

Each object has

properties methods events

Object

Class

Properties

Methods

Events

Page 21: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

21

21

*Give the suitable term to the following statement :

1- Integrated Development Environment . (….…………..)

2-It is the blueprint , from which the individual objects are created. It has (Properties , methods and events ) which any created object takes. (……………..)

3-A set of instructions or commands which are written in English upon defined rules according to each programming language . (…………………………………..)

4-It is the language which the computer understands and executes.(………………………….)

5- The functions which the object can perform . (…………………………………..)

6-The basic constructive element in object oriented programming languages.(……………)

7-An action which occurs on the object when left clicking on it . (……………)

*Put (√ ) or (× ):-

1-Visual Basic.NET is within Visual studio application. ( )

2-Class is created by the object. ( )

3-The object is an independent unit created from Class. ( )

4-Class represents the same properties , methods and events of the object. ( )

5-If we will consider the car as an Object then, its color represents one of its Methods.

( )

6-Class is Used to perform the object tasks. ( )

7-Event is an action perform on the object. ( )

8-Executing the command in V.B.Net is related to the event occurrence . ( )

9-We can't create more than one object from the same class. ( ) 10-Methods define the object shape .

12-V.B language is used to create web applications or windows application . ( )

13-Using the programming language is written orders and instruction in the English

Language that the computer can handled directly. ( )

14- The example of windows applications (notepad)program. ( )

Page 22: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

22

22

15-Object is the blueprint from which the individual class is created. ( )

16-Object has properties ,methods and events. ( )

17-Class contains the object definition . ( )

18-Can create more than one class of the same object. ( )

19-Through the .Net can produce desktop applications and mobile applications. ( )

20-The class is constructed out of object. ( )

21-Event is an action performed on the object. ( )

*Choose:-

1-Visual basic.net is a …………………………………..

a)programming language b) IDE c)windows application

2-……………………………. A collection of orders and instructions are written according to certain rules.

a)programming language b) IDE c)windows application

3-Compiler is used to convert ………………………………to a language understand by the computer.

a)instructions b)CLR c) VS

4-GUI means ………………………………

a)system class libraries b)Graphical user interface c) operating environment

5-……………………….contains the object definition .

a)IDE b)CLR c)class

6-…………………………… is the basic constrictive element in object oriented programming languages its created from a defined class .

a)properties b)object c)method

*Fill in the space using of the following words:-

(properties - event - method - object)

1-PC is considered as …………………………………….

2-PC size is considered as………………………………

3-Clicking the mouse inside the windows is considered as …………………………..

4- Opening a certain program from PC is considered as………………………………..

Page 23: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

23

23

-The .Net Framework is like the central nervous sustem for all visual Basic.Net applications; it is a platform that enables you to:

1-Develop application like (Desktop application),(Web application), (Mobile application)

2-Provide a development environment for running all application .

*The frameworks composed of :- 1- The execution engine (CLR) common language runtime. 2-System class libraries . 3-compilers . 4-Other element.

-Integrated Development Environment which is used in creating (.Net) application .

*The main elements of (IDE) screen :- 1-Form 2-ToolBox 3-Properties window 4-Solution Explorer

*Form:- It is the window (Visible interface) of the application where the different

controls are placed.

*Toolbox:- It contains the controls which are used in designing a program window.

*Properties:-It lists the controls properties and you can set these properties through

this window.

Notice: in IDE screen , displayed properties differ upon the selected element.

*Solution explorer:- This window lists the following :-

1-The project found in the solution.

2-The project files and folders.

*To create new project:- 1-open VB.net from the All program menu. 2-select new project from File menu. 3-from Template select windows forms application . 4-Type the name of the new project and then press OK.

(.Net framework)

IDE) screen )Main elements of

Page 24: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

24

24

*To add new (Form) to the (project):-

-from menu bar select project then Add window form. -select window form in name tap, you will find the suggested form name which is change able. -click Add then the new form window appears

*To save the project:- -open file then save All ,save project window appears.

a-name :the name of new project which was previously typed and is changeable.

b-location: you can press Browser button to determine the location for saving on one

of the storage device.

c-solution name: type the name of the solution which will include the project and it is

changeable also.

d-save: click to save.

*Add new project to solution:- - open file then Add new project t, the window appears to determine the name of the

new project .

-then the name of the new project appears in the solution explorer window as in the

figure.

1-the solution name .

2-the number of the project in the solution.

3-the second project name.

3

2 1

Page 25: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

25

25

*Put (√ ) or (× ):-

1-Properties window is used in displaying the properties of the used object in the project. ( )

2-To create a new project in visual basic , select New project from Edit menu. ( )

3-The name of the solution appears above the solution Explorer window. ( )

4-Solution cant contain more than one project. ( )

5-When creating a new project in VB.net , a form is created automatically at the beginning called New project. ( )

6-To Save all the project , Save all from the project menu.

*Give the suitable term to the following statements:

1-Awindow we put in the controls used in designing new program Environment.

(………………………….)

3-The basic constrictive element in object oriented programming languages.

(………………………….)

4-One of the component of IDE where the tools appear as or categories.

(……………………..….)

5- A window in the visual basic containing the names of the project and the name of the project's files and folders. (……..…………………)

6-Used to create several applications as: Desktop application, web applications.

(………………………..)

*To add a new project to the (solution), the steps will be as the following :

1-Open …………… Menu.

2-Select ………………….

3-Select…………………. From the sub-menu that will appear.

*Match:-

B A

Contains controls which divided into categories form Is used for displaying the project name files and folders. toolbox

The controls are placed on it for designing the new program interface.

Properties window

Is used for displaying the objects properties and setting them. Solution explorer

Page 26: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

26

26

First: Write in the table below what the following numbers indicate:-

1…………………………………………………

2…………………………………………………

3…………………………………………………

4…………………………………………………

Second: In the following (Add New Item) window, what the following numbers

indicate?

1……………………………………….. 2……………………………………….. 3………………………………………..

1

2

3

4

1

2

3

Page 27: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

27

27

Third: Refer to the following figure then, explain what the following numbers indicate?

What is the benefit of this window? ………………………………………………….. Number 1 indicates: ………………………………………………….. Number 2 indicates: ………………………………………………….. Number 3 indicates: …………………………………………………..

Fourth: In the displayed (Solution Explorer) window what the following numbers indicate?

1………………………………………

2………………………………………

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

4………………………………………

Fifth: Complete the sentences with the following:

Object -Class –Visual Studio –.NET framework –Programming language-Form

1- ……………………………….. is used in the development, and design of (Desktop application) - (Web application) – (Mobile application).

2- Through ………………………………, Instructions, and commands are written according to certain rules; and then translated to machine language. 3- ………………………………..provides an environment , that enables developers to design and execute (.NET applications). 4- ………………………………..is defined as: The basic constructive element in Object Oriented Programming; it is created from a defined class. 5- The blueprint, from which the individual objects are created; is called................

1

2

3 2

4

1

4

3

Page 28: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

28

28

-Before starting the review of the properties of some controls the following

Points should be noted:-

1. Some properties (such as: Text –Name –Forecolor –BackColor –RightToLeft….….etc.) are common to most controls. 2. Some properties will not be applied to controls placed on a form; unless we set other properties to these controls like :(RightToLeft ) and ( RightToLeftLayout).(The property RightToLeftLayout will not be active ,unless the property value of RightToLeft is (Yes) 3. Controls placed on a form will have, by default, some of the properties as the form. We can say that controls inherit some of the form’s properties e.g. (Font) and (ForeColor). *You can stop the (Debagging )by clicking on (stop Debugging) icon.

*Form window:-

-Object used in designing the program and all other objects are put on it.

*Function of Form: This form is used in designing the project interface and also:

a-Design the new program layout.

b-To set the controls on it.

c-To adjust the controls properties.

*Properties:- The most important properties are:

(Name – Text – BackColor – Form BorderStyle –ControlBox – MinimizeBox – MaximizeBox – WindowState – ShowInTaskBar – StartPosision – RightToLeft – RightToLeft Layout )

Page 29: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

29

29

Table (3-1) Form’s Properties

*Button:-

-An object used to do a certain tasks when clicking on it.

*Functions of button:-

-Used to execute a certain order when clicking it to draw the button on the form. Double click the button from the tool box.

*Properties:- (Name – Text – Forecolor – Font – Location – Size) it is preferred to start the control name with 3 letters indicate its type .

*Label:-

-It is a control which used in typing a title or text on the "form" window to represent its content to the user. The user can't change or remove his text during the program .

-Function of label:-

-write a title or text on the form to explain the program component and the user can't

Change it.

-To draw the label on the form or any other control:Double click on the control from The tool box.

Page 30: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

31

31

*properties:- ( Name – Text – Border style – Autosize – Image – Visible – Location – Size - RighttoLeft – Backcolor – Forecolor – Font )

Note: -If the Autosize property is set to false , you can manually adjust the size of the label. -If the Autosize property is set to True , the label size is automatically adjusted to fit the text displayed on the label.

*Text Box:-

-A Text Box control can be used for both entering data and displaying result.

-The user can change or remove the text during the program .

*Function:-

-Allows the user to enter data while running the program.

*Properties :-

(Enabled – Maxlength – Password char – Multiline)

Page 31: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

31

31

*Put ( √ ) or ( × ) :-

1-We can't change the value of Name property in the Form window.( )

2-Text property of the Button control determines the name which is used when typing the code .( )

3- The effect of the Location property of the Button control appears automatically

after setting it .( )

4-The title of the Form window must be at the left of the window Title Bar. ( )

5-We can't adjust the size and location of the Button manually during the run-time.( )

6-The content of the Label control can't be adjusted during the run-time.( )

7-RightToLeft property of the Form window is not active unless its value is No.( )

8-When inserting a new Label control on the Form window ,the Name property value will be the same as the value of Text property.( )

9-We can adjust some controls via setting the properties of the Form window.( )

10-We can make TextBox control with multiple lines via MaxLength property.( )

11-PasswordChar property of the TextBox determines the alternative symbol to the contents of the TextBox.( )

12-When the value of AutoSize properties is False, the user will not be able to adjust the size of the Label control.( )

13-The programmer can't adjust the number of the characters in the TextBox.( )

*Complete:-( backcolor-formborderstyle-name-Toolbox -True-label-Autosize-Button-

Windowstate- TextBox-MaximizeBox-visible)

1-The value of ………………… property is used when typing the commands in the Code window.( )

2-…………………..property is used to adjust the background color of the Button.

Page 32: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

32

32

3-The……………………control delivers a massage or information to the user.

4-To hide the title bar of the Form window, use……………………………….property.

5-………………value of MultiLine property makes the TextBox with multiple lines.

6-When double-click on the Button in ………………..a copy of this control is placed on the form window.

7- Form window can fit full screen via ……………………property.

8-…………………… control enters data to the program during the run-time.

9-We can hide the Label via……………………property .

10-……………………. Is a control used in performing a defined task when clicking it during the run-time.

11-……………………. Property doesn’t allow the programmer to adjust the size of the Label control in the design stage.

12-………………… property is used to hide the maximize icon on the title bar of the form window.

*Give the suitable Term:-

1- A property for the name of the control which is used when typing the commands in

the code window . (……………………..)

2-A property makes the Button inactive during the run-time.(………………………)

3-The window of the new program where the program controls are placed.( ……………….)

4-An object used to do a certain tasks when clicking on it .(……………………..)

5-It is a way for entering the data of the program that it allows the user to type in it during the program.(……………………………)

*Choose:-

1-Default value for the …………………property match default value of the Text property

In form window.

a)Tag b)Name c)Font

2-In the properties window the left column which represents …………………………….

a)Means the methods of active control.

b)properties of the active control.

c)properties value.

Page 33: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

33

33

3-To adjust the direction of the writing within the tools in the form window using ………

Property. a)RightToLeft b)RightToLeftLayout c)Text

4-Through the …………………….property can control the outline of the form window.

a)FormBorderStyle b)BorderStyle c)Borders

5-Property ……………………………..responsible for determining the color of the text that appears on some of the tools .

a)Color b) BackColor c)ForeColor

6- To change the size of label tool use size property ,after adjusting the value of the property AutoSize with …………………

a)True b)False c)Yes

7- To adjust the outline of the label tool use property …………………………..

a)BorderStyle b)FormBorderStyle c)Borders

8-TextBox used in ……………………………….

a)Display form titles b)receiver input user c)display a list of items

9-The Key responsible for start debugging is ……………………..

a)F1 b)F5 c)F7

Page 34: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

34

34

*List Box:- -It displays a list of items to select from them.

*Function:-show a list of items to choose from them.

*Properties:- (Items – Sorted – Selectionmode)

*ComboBox:-is a control display a drop-down list from which one item can be selected.

*Function:-

a-Show adropdown menu to choose from.

b-Allow the user to enter data while running the program .

*Properties:-( Item s – AutoCoppleteSource – AutoCompleteMode )

Page 35: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

35

35

*GroupBox:-

-A control is used to group other control of some function together on the form window.

*Function:-

a-Show a dropdown menu to choose from.

b-Allows the user to enter data while running the program.

*Properties :- (Name – Text – Visible – BackgroundImage).

*Radio Button:-Is used to select one option from a group of mutually exclusive

options.

*Function:- Displays a set of options which allows the user to select one option only

during the program.

*Shape:- A small circle next to the item.

*Properties:-(Name – Text – Checked).

Page 36: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

36

36

*Check Box:-A (check box) control is used to select one or more options.

*Function:-Display a set of options and allows the user to select one option or more. *Shape:- a small square next to the item.

*Properties:- (Name – Text – Checked ).

*Put( √ ) or ( × ):-

1-There are no common properties among the controls ( )

2-Item property is common between ComboBox,ListBox. ( )

3-The active control name appears above the properties window. ( )

4-The default values of the Name ,Text properties are the same in the ListBox control.

( )

5-When GroupBox is invisible (visible = false) , the included controls will be invisible either. ( )

6-The properties of several controls can appear in the properties window at the same time. ( )

7-Checked property of the RadioButton control takes (Yes /No)value. ( )

8-We can't select several items from ListBox during run-time . ( )

) ( 9-ComboBox control doesn't have Text property.

10-Checked property of CheckBox control gains its value during run –time. ( )

Page 37: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

37

37

11-The effect of all the properties appears on the controls in the design stage. ( )

12-We can select several RadioButton controls at the same time by using the

GroupBox. ( )

13-By" GroupBox " control we can make "RadioButton " control used in choosing more than one option at the set time. ( )

14-GroupBox control is used in grouping a set of controls and displaying them in one group. ( )

15-Can not be in alphabetical order of the elements of the ListBox tool. ( )

*Complete:-

1-To start the program ,use the start icon in ………………………..

2-…………………….property is used to place an image in the background of the GroupBox.

3-To display a set of options to the user and allow him to select one or more items , use …………………………control.

4-………………….. property seta the text's font style and size in the Button.

5-……………………..property enables or displays the ControlBox of the Form window.

*Match:-

B A

Display a set of options to select one option only TextBox 1 Creates a list of items to select Button 2

Displays a set of options to select one or more options RadioButton 3 Allows the user to type in it during the run- time CheckBox 4

Performs a defined task when clicking on it Label 5

Displays titles to show the remaining program tools ListBox 6

*Give the suitable term to the following sentences:

1- A control similar to the form window which contains other controls to arrange them

(……………………….…..)

2- A property for the name of the control which is used when typing the commands in the code window. (………….…..……………)

3- A property makes the button inactive during the run-time. (…………………..……….)

4-The window of the new program controls are placed. (……………….……………)

5-A control used to display a list of items and to enter data during the run-time.(..............................)

Page 38: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

38

38

*Match:-

B A

Used in the selection of several alternatives. GroupBox

Is used to click it to perform a specific task. CheckBox Includes a number of tools at a specific address. Button

Used in the selection of an alternative from several alternatives. RadioButton

*Complete the following words of the suit between brackets:-

(BackColor – Enabled – Visible – Text – Click – False )

1-You can write on the Button using the property…………………………

2-You can show or hide the button by using the property…………………………..

3-You can use property ……………………. to change the Background color model.

4-The feature is used ………………………to know the response tool for the user program and whether value ……………………the tool dose not response to the program.

*Complete the following table using suitable property:-

Determine the outline of the label control ………………………….. Adjust the text color which appears on the button …………………………..

Contains the name of the button which is used when typing the commands in the code window.

…………………………..

Change the label size automatically to fit its content …………………………..

Change the content of the TextBox. …………………………..

*Place the appropriate number in front of the column(b), including suited of the column(a):-

B A

Belong to Form (….) PasswordChar 1 Belong to Textbox (….) AutoCompleteMode 2

Belong to List Box (….) AutoSize 3 Belong to ComboBox (….) ShowInTaskbar 4

Belong to Label (….) 5

Page 39: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

39

39

*Complete the following sentences from the brackets:-

(Items – MaxLength – True – TextBox – PasswordChar )

1-………………………..control is used to input data to program in the start stage.

2-To input data in the ListBox , use …………………. Property.

3-When Autosize property takes the value ……………………., control size will fit its contents automatically .

4-…………………..property is used along with the TextBox when creating a password.

5-………………….. property is used to adjust number of the written characters in the TextBox.

*Choose the correct answer :-

1-To provide the possibility to choose one and only one item use the control.

a)RadioButton b)CheckBox c)GroupBox d)ListBox

2-To allow the selection of one or more items choose the control.

a)RadioButton b)CheckBox c)GroupBox d)ListBox

3-You can choose more than one item if you use:

a)ListBox b)ComboBox c)GroupBox d)RadioButton

4-The solution Explorer window contains:

a)Properties b)Controls c)projects d)all of the above

5-The project can run in test mode by presenting (…………..)from the keyboard

a)F2 b)F4 c)F8 d)F5

*Complete the following words by matching choice:-

1-……………………property is found in many controls.

a)font b)PasswordChar c)AutoComplete source

2-If the ControlsBox property is set to the False value the ControlBox is ……………………….

a)become unavailable b)shows c)disappears

3-Property ……………………… show the effect after StartDebugging .

a)backcolor b)Text c)ShowInTaskBar 4-Property………………..uses in order of elements in the ListBox tool a)selection Mode b)Items c)Sorted 5-The tool that draped them to view a list of its elements is …………………………… a)ListBox b)ComboBox c)GroupBox 6-The ……………………………..tool is used to separate the two sets of RadioButton a)ListBox b)ComboBox c)GroupBox

Page 40: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

41

41

First :State whether the following statements are true (T) or false (F):

1. Some (Properties) are not effective unless other (Properties) are adjusted first. (

2. When you create a new (Project) a (Form) window is added to work with.( ) 3. There are no common (Properties) between one (Control) and another.( )

4. A value should be assigned to any (Property).( )

5. You can modify the value of a property assigned to a (Control) through the (Toolbox).( )

6. The value of the (Property) Size is 98;108 means that the width is 108 and, the height is 98.

( )

7. Radio Buttons are used when the user has the possibility to choose more than one

alternative. ( )

8. User can not choose any item in the control (CheckBox).( )

Second: choose the correct answer:

1. To provide the possibility to choose one and only one item use the control: A.RadioButton B-Checkbox C - GroupBox D-ListBox 2. To allow the selection of one or more items choose the control:

A.RadioButton B-Checkbox C-GroupBox D- ComboBox 3. You can choose more than one item if you use: A-ListBox B- ComboBox C-GroupBox D-RadioButton

4. The Solution Explorer window contains: A-(Properties) B (Controls) C-Projects D-All of the above 5. The project can run in test mode by pressing (……) From the keyboard A-F2 B-F4 C-F8 D-F5 Third: Type the names of the Controls displayed on the shown Form window:

no control

1

2

3

4

5

6

Page 41: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

41

41

Fourth 1. Write the name of the (Property) that enables you to control the size of the Control (Label) using mouse pointer. ……………………………………………………………………………………………………………………………………. 2. Write the name of the (Property) that makes the writing direction from right to left. ……………………………………………………………………………………………………………………………………. 3. Write the name of two (Properties) that have no effect unless you initiate the (Start Debugging).

……………………………………………………………………………………………………………………………………………….

Page 42: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

42

42

Code Window :

It is the window where to write commands and instructions ( code ) in V.B.Net.

Code :

It refers to the instructions which are written in the programming language and the computer executes after converting them to the machine language.

Methods of opening the code window in V.B.Net :

1-open view from the standard tool bar and select code.

2-Press F7 on the Keyboard.

3-Right click on the file name " form1" in the " solution explorer" window and then , select view code from the menu.

4-double click on the control on the form window

*The main components of code window :

1-Name of the file where codes are saved

2-Name of the file where the Form window is

saved

3-The declaration of Class ,its name is ( Form1)

4-Space between two lines, to type Code for the

class ( Form1)

5-The end of the class.

Note :

-when creating a new project ,solution appears on IDE.

-when writing the commands in Code Window , the following lists will be used:-

a-Class Name menu : Displays the names of the used objects or controls in the project.

b-Method Name menu : Displays the events related to the selected object from the

Class Name menu.

Page 43: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

43

43

*Event handler:

-It is the procedure ( called into action ) when an event occurs

-Set the object properties programmatically.

-Control Name Property = Value

-(Write End) to end the program.

*Statement of setting the properties programming:

-We had previously learned the way of changing the value of any property through the

*Properties Window.

-Now we will learn the way of changing the value of any property via writing a code in the Code window.

-We should recognize that , there are some properties which can't be set programmatically through the Code window that they aren't visible in the Properties window.

-Also that, any property which its value is changed programmatically , its effect appears only during the program run-time.

*Rule Explanation:

1-Write the names of the object and control which we want to set their properties and put (. ) after the name.

2-Write the property which is responsible for the desired setting.

3-Write the new value of this property.

ControlName.Property=Value (It is an important , frequently used rule)

Example:

-Setting the text which appears on button1 to be ( Egypt ).

-The code will be as the following:

Button1.Text = "Egypt"

-Adjust the text which appears on the control (LbL_First) to (FirstNumber)

LBL_First.Text="FirstNumber"

-Adjust the forcolor of the text which appears on the control (Btn_Name) to Red .

Btn_Name.Forcolor=Color.Red

-Write the command to hide Label1 during the program run-time .

Label1 .Visible =False

-write the command which inactivates Button1 during the program run-time.

Button1 .Enabled =False

-Adjust the style of the font which appears on the button (Label_Name) to (Andalus) and the

Font size (35). Lbel_Name.font =New Font ( "Andalus", 34)

Page 44: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

44

44

*The values assigned to properties may have several types:

1-The abstract value : e.g. property ( Text).

2-The logical value:e.g.property ( Visible , Enable )

3-The value selected from a list , e.g.property ( ForeColor )

4-The value formed from creating an ( Object ),e.g. property (Font).

5-The value of the result of arithmetic expression .

6-The value of a variable or Property.

*Put ( √ ) or ( × ) :

1-The effect of the programmatically set properties appears in the design stage . ( )

2-We can open the Code window via the Solution Explorer window . ( )

3-Whe creating a new project , the Solution name appears in IDE window. ( )

4-The first line in the Code window declares a class with the name of the form window. ( )

5-The executed codes at the event occurrence are written after EndSub. ( )

6-It is preferred to write three characters at the beginning of the control to define the class of the control. ( )

7-The value which is placed in the property can be in the form of abstract or logical value.( )

8-To end the program, write EndClass in the procedure . ( )

9-GroupBox1.Enabled=False hides the GroupBox during the program run-time. ( )

10-Code window from which you can type command and instructions. ( )

11-Code window can be opened only by pressing the F7 key. ( )

12-To open the code window for the first time it appears declares a class with the name of the form window. ( ) 13-Class Name menu in the code window shows the events that was chosen from a list of method Name. ( )

14-Event handler is an event that calls upon the occurrence of an action. ( )

15-You can adjust the properties through the properties window only. ( )

16-When you open the list of the ClassName the names of the controls matched for a name property each one of them. ( )

17-You can write the code for the form window below the EndClass line. ( )

18-Write the event handler code before the sub line of the event handler. ( )

19-The following code Label1.ForeColor=Color.Red the value from the list. ( )

Page 45: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

45

45

20-The following code Label1.Text="I Love Egypt" the value of an object. ( )

*Complete the following sentences from the brackets:-

( Font – End – MethodName – Event handler – Enabled)

1-……………………property is used to adjust the font style and size .

2-We can end the program by writing ………………in the Event Handler.

3-…………………….property sets the object response to the user during the program run-time.

4-………………….refers to the invoked procedures when event occurs .

5-Menu in the code window displays the names of the events related the object ………………………

*Type the necessary code executing the following :-

a)Changing the text on "Button1" in to "computer".

………………………………………………………………………………

b)Changing the Font on "Button " control in to "Red".

……………………………………………………………………………………

c)Changing the background color of "Button1" in to "Blue".

………………………………………………………………………………………….

d)Deactivate "Button1"control.

…………………………………………………………………………………………..

e)Make "Button1"control invisible .

…………………………………………………………………………………………..

*Match:-

A B

1 Class Name Display events of the selected control. 2 Code window Displays the names of the controls on the form window.

3 Method Name From which you can write orders and instructions. 4 End sub The end of the line classification.

5 The end of the line event handler.

Page 46: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

46

46

A B

1 Sub button1_click Means the event handler

2 Event handler Formula set properties programmatically 3 controlName.property=value Name an event handler

4 End Class The end of the line classification 5 The end of the line event handler

*Complete:-

1- you can open the code window by pressing a key…………………………….

a)F5 b)F7 c)F1

2-The end of the line classification writes……………………...code.

a)Before b)after c)Before and after

3-Name the event handler when you create through IDE consist of …………………………….

a)Name of the control

b) the name of event

c)name of the control and name of the event

4-Class Name list in the code window displays ………………………………………………..

a)Names of the controls on the form .

b)events that could occur a control.

c)the names of the various event handlers.

5-Method Name list in the code window displays ……………………………………………………..

a)Names of the controls on the form.

b)Events that could occur on a control.

c)the names of various event handlers.

6-To set the properties programmatically using the formula control name……………………

=value.

a) Property b)event c)method 7-Type the value for the following sentence Label1.Enabeled =True a)logical b)abstract c)from list

Page 47: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

47

47

1. In the shown figure what the following numbers indicate?

2. In the following Form perform the following: Type the appropriate lines of code for each Button

so that when you click any (Button); it changes the

background color for the (Label) to the corresponding color written on the button.

Take in consideration that the property (Name) of

the Label is (label1)

………………………………………………………………………………………………………………………… Red button

………………………………………………………………………………………………………………………… Green button

………………………………………………………………………………………………………………………… Blue button

Page 48: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

48

48

3. Type the appropriate lines of code ,and use the Property (Visible) to show or hide the label (label1)

4. You have several properties for the control (textbox1) change it to the values shown (by writing the corresponding lines of code)

………………………………………………………….

Show(label1) ………………………………………………………….

Hide (label1)

Page 49: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

49

49

Page 50: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

51

51

Page 51: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

51

51

Page 52: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

52

52

Page 53: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

53

53

Page 54: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

54

54

Page 55: Data Processing Information Input (Arithmetical or Logical ...2- Each symbol in the flowchart has its own significance and fixed use from chat to another. ( ) 3-The flowchart must

55

55