Programming Fundamentals: TextBox Control, Variables and Data Types, Quizzes of Computer Science

Definitions and explanations for various programming concepts including textbox control, clearing contents, variables, variable declaration, data types, variable names, rules for naming variables, string data type, concatenation, local variables, and scope.

Typology: Quizzes

2015/2016

Uploaded on 09/02/2016

cookmade
cookmade 🇺🇸

22 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
TERM 1
TextBox Control
DEFINITION 1
A rectangular area that can accept keyboard input from the
user.
TERM 2
Clearing contents
DEFINITION 2
To clear the contents of a TextBox control you assign an
empty string ("") to the control's Text
property.ex.nameTextBox.Text="";
TERM 3
Variable
DEFINITION 3
A storage location in memory that is represented by a name.
TERM 4
Variable Declaration
DEFINITION 4
Specifies two things about the variable:
The variable's data type, which is the type of data the
variable will hold
The variable's name
Written in the general format: DataType VariableName;
TERM 5
Data Type
DEFINITION 5
A variable's data type indicates the type of data that the
variable will hold.ex. strings, integers, real numbers (These
data types are known as primitive data type)
pf3

Partial preview of the text

Download Programming Fundamentals: TextBox Control, Variables and Data Types and more Quizzes Computer Science in PDF only on Docsity!

TextBox Control

A rectangular area that can accept keyboard input from the user. TERM 2

Clearing contents

DEFINITION 2 To clear the contents of a TextBox control you assign an empty string ("") to the control's Text property.ex.nameTextBox.Text=""; TERM 3

Variable

DEFINITION 3 A storage location in memory that is represented by a name. TERM 4

Variable Declaration

DEFINITION 4 Specifies two things about the variable: The variable's data type, which is the type of data the variable will hold The variable's name Written in the general format: DataType VariableName; TERM 5

Data Type

DEFINITION 5 A variable's data type indicates the type of data that the variable will hold.ex. strings, integers, real numbers (These data types are known as primitive data type)

Variable Name

A variable name identifies a variable in the program code. When naming a variable, you should always choose a meaningful name that indicates what the variable is used for. TERM 7

Rules for naming a variable

DEFINITION 7 The first character must be one of the letters a/A through z/Z or an underscore character (_). After the first character, you may use the letters a/A through z/Z, the digits 0 through 9, or underscores. The name cannot contain spaces. TERM 8

String data type

DEFINITION 8 A variable of the string data type can hold any string of characters. After the variable has been declared, you can use the assignment operator (=) to store a value in the operator.ex. string productDescription; productDescription = "Italian Espresso Machine"; TERM 9

Concatenation

DEFINITION 9 Appending one string to the end of another string. Use the + operator to concatenate strings. ex. string message;message = "Hello" + " world"MessageBox.Show(message); TERM 10

Local Variables

DEFINITION 10 Variables that are declared inside a method. A local variable belongs to the method in which it is declared and only statements inside that method can access the variable.