1/72
Flashcards for exam revision
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Visual Basic Program Creation Order
The correct order is: Create the interface, set the properties, write the code
Visible Property
The property that if set to false, will cause the control not to be seen.
Check Box
Involves turning on or off an option in a dialog box.
Function
A reserved word in Visual Basic.
Boolean
A data type to store a value that has one of two possible states such as true or false.
Subprogram
A self-contained section of code that performs a particular task.
OOP (Object-Oriented Programming)
Requires a programmer to package data and the methods into a single unit called an object.
Logic Error
Result from an incorrect series of steps to solve the problem.
Internal Documentation
Comments or remarks within the program code to explain its purpose.
Visual Basic
An Object-oriented programming language
The Toolbox
Window to see all of the objects that you can add to a form.
TextBox control
Control that displays text that can be modified by the user
Single
Data type for decimal
Names may contain spaces
Naming identifiers that is not allowed
>
Type of operator used for comparison.
If
Logical operator
A nested If
If statement contained within another If statement.
Startup
The form that us loaded first in a project with multiple forms
ListBox
Control from the toolbox to create list boxes on a form
FirstName
Example of Camel casing
Illegal variable name
2nd_Try
Legal variable name
OurCompanyName
Legal variable name
Rnd
Legal variable name
Address_Line2
Illegal variable name
Howareyou?
Visual Basic Syntax for R = D 2
R = D / 2
Visual Basic Syntax for Count 10
Count >= 10
Visual Basic Syntax for Perimeter = 2(L + W)
Perimeter = 2 * (L + W)
Visual Basic Syntax for Y = 32
Y = 32
Caption Value for Extra cheese
Value would be TRUE
INT(7.8)
Result is 7
9 mod 2
Result is 1
16\10
Result is 1
8 + 3 ^ 2
Result is 17
Format(3/4, “#.###”)
Result is .75
Format(3/4, “0.000”)
Result is 0.750
Format(3/4, “#.000”)
Result is .750
Format(3/4, “0.###”)
Result is 0.75
Single line of code to display the letter “A” on a button called, btnA
btnA.Text = "A"
What is internal documentation?
Adding comments to the code to explain what it should do. It's used to enable better program understanding and easier debugging.
the two different roles of the equals sign
the equals sign is assigning a value to a variable; the equals sign is used as a comparison operator.
“Jonathan” > “Johnathon”
TRUE
“television” = “TV”
FALSE
“Australia” < “Oz”
FALSE
What is the difference between syntax error and logic error?
Syntax error, means that an error has been made with the grammar of the programming language. Logic error, means the program compiles and runs but it produces the incorrect result.
Controls
btnEnlarge and lblMessage
Event
Click
Property
FontSize
Value of property
13.5
A variable LastName holding the surname of a student
Dim LastName As String
A variable GameOver that is to have a value of TRUE or FALSE
Dim GameOver As Boolean
A variable IntRate that hold the value of bank interest rate as a percentage
Dim IntRate As Single
A constant Pi that has a value of 3.14
Const Pi As Single = 3.14
Condition
chkItalic.Checked
‘Then’ action
txtEntry.Font = New Font("Arial", 12, FontStyle.Italic)
‘Else’ action
txtEntry.Font = New Font("Arial", 12, FontStyle.Regular)
Object-Oriented Programming Language
VB is called Object-Oriented Programming because: VB treats all the elements found in the language as objects. This makes for a more effective method of programming, as the programmer focuses their attention on what they want individual objects to do, rather than giving step-by-step instructions to the computer.
Event handler that will calculate and display the volume.
Volume = Length × Width × Height)
77
Integer
Sarah Tang
String
4.56
Sindle
TRUE
Boolean
Form
frm
Button
btn
Check box
chk
Horizontal scroll bar
hsb
Label
lbl
Picture box
pic
Radio button
rad
Text box
txt
Timer
tmr
Vertical scroll bar
vsb
Image list
iml