When you program buttons, what are the categories for the coding?
(i.e., the green comments that you group your coding into?)
Give the format for Assigning the text entered in the Text Box control labeled “txtBill”, to a variable called “billAmount”.
variable = CStr(txtBox.Text)
e.g., billAmount = CDbl(txtBill.Text)
What type of code do you see under ‘Assignment Statements for Input?
variable = CDbl(txtBox.Text)
What type of code do you see under ‘Output Data to the Form?
txtBox.Text = CStr(calculationVariableFromTheCalcStep)
e.g., txtMpg.Text = CStr(milesPerGallon)
How do you clear out a text box?
ControlName.Text = ‘’ ‘‘
e.g.,
txtGradeTwo.Text = “”
OR
controlName.Clear
e.g.,
txtOne.Clear
How do you clear out a list box?
ControlName.Items.Clear( )
e.g., lstOutput.Items.Clear()
Give the basic Template for Adding Data to a LIST box:
ControlName.Items.Add( )
E.g.,
lstOutput.Items.Add(“Student Grade One Is: “ & CStr(gradeOne))
lstOutput.Items.Add(“Student Grade Two Is: “ & CStr(gradeTwo))
lstOutput.Items.Add(“Student Average Is: “ & CStr(average))
How do you program a text box to say: “Student name’s average is studentAvg”
txtOutput.Text = “Student “ & name & “‘s average is “ & CStr(studentAvg)
What is the VB code indicating that a radio box has been checked?
controlName.checked = True
e.g., (radSenior.Checked = True)
How do you program a text box to say Hello? What is the code?
controlName.text = “Hello”
e.g., textOne.Text = “Hello”
What is Tab Index?
the order in which your cursor moves when you hit Tab
Where in the Visual Studio program do you go to adjust the Tab properties of a control?
Right-Mouse-Click (RMC) on that control → click “Properties” → go to the BEHAVIOR section under the Properties window
Give the code to change the background color of a text box labelled “txtOne” to Green.
txtOne.BackColor = Color.Green
Give the code to change the color of the text, written inside a text box, to Blue.
controlName.ForeColor = Color.Blue
e.g., txtOne.ForeColor = Color.White
A text box is labelled txtOne. Give the code to change the color of the text, written inside a text box, to White.
txtOne.ForeColor = Color.White
What are the 3 operations that most programs perform?
Input
Process
Output
What is an algorithm?
logical sequence of precise steps to solve a problem
Examples of higher-level languages:
Give examples of a Control:
List the steps of the Software Development Life Cycle:
Define coding.
it’s the technical word for writing a program
What is the purpose of documentation?
to allow another person to understand your program/coding
What is pseudocode?
an abbreviated plain English version of actual computer code.
Uses English-like phrases with some VB terms to outline the task
What term is used by the textbook for an “if statement”?
dunno