Wednesday, February 25, 2009

7. If carTextBox.Text = "Grand Am" Then carMakeLabel.Text = "Pontiac" Else carMakeLabel.text = ""
End If

8. If units < text = "Entry error" text = "Valid Number">
End If

9. If quantity < text = "Reorder" text = "OK">
End If

13. If hours > 40 Then gross = ((hours - 40) * 1.5D)) + (hours * hourRate) Else gross = hours * hourRate
End If
grossLabel.Text = Convert.ToString(gross)

Thursday, February 12, 2009

1. C - Variables are temporary memory locations.
2. D – income94, inc_94, incomeTax are all valid variable names
3. C – A procedure level variable is known only to the procedure in which it is declared
4. A – A literal constant is a memory location whose value can change while the program is running.
5. D – A variables can change.
6. C - Objects is the default value
7. B - price = 2.89D
8. C - isConverted = TryParse.Decimal (inputRate, rate)
9. A - Add and then convert.
10. D - commission = Convert.ToSingle(sales) * 0.5S
11. A - Const Rate As double - .09
12. C - Convert to string
13. A - ' to comment
14. A - block level variables are used the most
15. C - Implicit off
16. A - Foucs()
17. C - You need "" around strings.
18. B - It needs ()
19. A - Logical error
20. C - D stands for decimal

Friday, February 6, 2009

Boolean Variable: A variable that can be changed between true and false, true or false

String: A series of characters that do not have numberical data but are a value, "Hello, world!"

Method: The operations that an object is capable of performing,

import System.Globalization: Contains definitions for numberStyles and NumberFormatInfo, age = 35s

Operators: mathmatical symbols used in calculations, +-*/

Procedure Scope: The scope of the use of the variable in the procedure,Button click is event procedure.

Block scope: The scope of block-level variables, which can be used only within the statement block in which they are declared, If...Then...Else

Option Strict: strings will not be implicity converted to numbers, and vice versa, narrower data types will be promoted to wider data types, wider data types will not be demoted to narrower.

Focus Method: Used to move the focus to a control while an application is running, sending the focus to the name text box.

Identifier: The name of an object, nameTextBox

Literal Constant: An item of data whose value does not change while an application is running, tax rate.

TryParse Method: Used to convert a string to a number. 4 to int 4.

Convert Class: This class contains methods that return the result of converting a value to a specified data type, float to int.

Scope: Indicates where a variable can be used in the application's code, int.money can not be used in order form section.

Comments: Used to document a program internally; created using the apostrophe. 'Read this comment.

Static Variable: a procedure level variable that retains its value when the procedure ends, cost remains the same through out.

Pseudocode: Uses prhases to describe the steps a procedure needs to take to accomplish its goal, Set cost to 4 and then multiple it by 2.

Format Specifier: Determines the special characters that will appear in a formatted number, float to int removes the decimals.

DIM: A method to declare a variable in Visual Basic. Ex. Dim incomeValue

Literal Type Character: a character used to convert a literal constant to data type.

Line Continuation Character: An underscore, which must be preceded by a space; used to break up a long instruction into two or more physical lines in the Code Editor window.

Precedence Numbers: Indicate the order in which the computer performs an operation (such as an arithmetic operation) in an expression.

Lifetime: Indicates how long a variable remains in the computer in the computer’s internal memory.

Module Scope: Refers to the scope of a module-level variable, which can be used by all of the procedures in the current form.

Option Explicit: Disables implicit declaration of variables.
Empty String: A set of quotation marks with nothing between them.

1. You make sure that the variable name doesn’t conflict with other commands and use a discriptive title.
blueBoards
2. You use the DIM command to declare a variable.
Dim blueBoards As Integer
3. The difference between DIM and Const is that a constant variable is only named once and assigned a value that stays the same, a DIM variable can be changed.
Const TaxRate As Decimal = 0.06D
4. To include mathematical expressions in the assignment statements you use a variable.
totalSkateboards = blueBoards + yellowBoards
5. To clear a text property when an appliacation is running you use the clear function.
blueTextBox.Clear()
6. To format a number for outpout as a string you use the Convert.Tostring function.
totalBoardsLabel.Text = Convert.ToString(totalSkateboards)