Wednesday, March 18, 2009

String Manipuulatiion Review Topics

Trim Methods
Length
Mid statements
Beginning and End
Pad Left and Pad Right
Sum String Method

Checkbox, Boolean Values

Monday, March 16, 2009

Programming: Chapter 6 Vocab

CHAPTER 6 VOCABULARY:
Length Property: Stores an integer that represents the number of characters contained in a string, or the number of elements contained in an array.
TrimStart: Removes one or more characters from the beginning of a string, and then returns a string with the appropriate characters removed.
TrimEnd: Removes one or more characters from the end of a string, and then returns a string with the appropriate characters removed.
Trim: Removes one or more characters from the beginning and end of a string, and then returns a string with the appropriate characters removed.
Remove Method: Removes one or more characters from a string, and then returns a string with the appropriate characters removed.
Index: The unique number assigned to each item in a collection, and to each character in a string.
Replace Method: Returns a string with all occurrences of a sequence of characters replaced with another sequence of characters.
Mid Statement: Replaces a portion of string with another string.
PadLeft method: Returns a string eith the apprpriate characters inserted at the beginning of the string.
PadRight method: Returns a string with the appropriate characters inserted at the end of the string.
Insert method: Returns a string with the appropriate characters inserted.
StartsWith method: Returns the Boolean value True when a specific sequence of character occurs at the beginning of a string; otherwise, it returns the Boolean value False.
EndsWith: Returns the Boolean value True when a specific sequence of characters occurs at the end of a string; otherwise, it returns the Boolean value False.
Contains method: Returns the Boolean value True when a specific sequence of the characters appears in a string; otherwise, it returns the Boolean value False.
IndexOf method: Searches a string for a substring, and returns the number -1 when the subString is not found in the string; otherwise, it returns the index of the starting position of subString within string.
Substring method: Returns characters from a string.
String.Compare method: compares two strings and returns an integer that indicates the result of the comparison.
Like operator: Allows you to use pattern-matching characters to determine whether one string is equal to another string.
Radio Button Tool: Allow you to limit the user to only one choice in a group of two or more related and mutually exclusive choices.
Check Box Tool: Allows the user to select any number of choices from a group of one or more independent and nonexclusive choices.

Wednesday, February 25, 2009

Review Questions

1. Dim name As String, Dim price As Decimal

2. Dim name As String, Dim height As Decimal, Dim weight As Integer

3. City = “Miami”

4. Sales1 + sales2 = totalSales

5. Salary * 1.5 = salary

6. Dim employeename As String, needs to be entered after the click procdure coding, it is a module-level variable.

9. isConverted = Integer.TryParse(unitsTextBox.Text, _NumberStyles.AllowThousands, NumnerFormatInfo.CurrentInfo, numberofunits)

15. A static variable is a variable that will remain the same in every line of code it is placed in.

Page 260

7. If carTextBox.Text = “Grand Am”

Then carMakeLabel = “Pontiac”

8. If units < 0

Then messageLabel.Text = “Entry error”

Else messageLabel.Text = “OK”

9. If quantity < 0

Then messageLabel.Text = “Reorder”

Else messageLabel.Text = “OK”

13. If hours > 40

Then gross = hours * hourRate * 1.5

Else gross = hours * hourRate

EndIf

grossLabel.Text = gross

Tuesday, February 24, 2009

Review Questions

1. D
2. C
3. B
4. A
5. A
6. C
7. B
8. C
9. D
10. C
11. D
12. C
13. C
14. B
15. B
16. D
17. C
18. B
19. A
20. D

Thursday, February 5, 2009

Vocabulary (Complete)

Vocabulary
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)

Monday, January 26, 2009

For David, Vocabulary for AOIT.

Project: a series of documents related to each other that are grouped into one file and define a program.

Solution Explorer Window: solutions, a set of code files and other resources, are arranged hierarchically and the explorer window is used to browse these files.

IDE: a software application that that provides comprehensive facilities to computer programmers for software development, usually includes a source-code editor, a compiler, build automation tools, and a debugger.

Source File: Usually called source code, a source file is a collection of statements in any human-readable computer programming language.

System programmers: Unlike application programmers, system programmers program software that provide services to computer hardware instead of human operators.

Solution: a set of code files and other resources that are used to build an application.

Properties: a type of class member in object-oriented programming.

Program Programmers: programmers who use a program which is a language that is used to write source code which is then converted into binary by a compiler.

Polymorphism: The object oriented feature that allows the same instruction to be carried out differently depending on the object.

Inheritance: refers to the fact that you can create one class from another class.