Starts/EndsWith Method ~ Determines whether or not a string of characters are at the beginning or end of a string.
phone = InputBox("10-digit phone numer:", "Phone")Do While phone.StartsWith("312") phoneListBox.Items.Add(phone) phone = InputBox("10-digit phone number", "Phone")LoopDim cityState AS String = cityStateTextBox.Text.ToUpper()If cityState.EndsWith("CA") Then stateLabel.Text = "California customer"End If
Contains Method ~ Searches a string to find if it contains a sting of symbols.
Dim address As String = "345 Main Street, Gelndale, CA"Dim isContained As BooleanisContained = address.Contains("Main Street")
IndexOf Method ~ Like the Contains method, but it gives back an integer telling you where the string is.
Dim message As String = "Have a nice day"Dim indexNum As IntegerindexNum = message.IndexOf("nice", 0)
Substring Method ~ used to access any number of characters contained in a string, such as letter, words, etc.
Dim fullName As String = "Peggy Ryan"firstName = fullName.Substring(0, 5)lastName = fullName.Substring(6)
String.Compart Method ~ Allows you to compart two strings for whether or not they are similar.
Dim result As Integerresult = String.Compare("Dallas", "Dallas")
Like Operator ~ Finds out if two strings are equal to each other.
isEqual = firstName.ToUpper() Like "B?LL"
Radio Button Tool ~ used to add a radio button to the interface.
Check Box Tool ~ used to add a check box button to the interface.
Monday, March 16, 2009
Thursday, February 26, 2009
Article
David Galvez
1. Windows 7: Trouble on the Upgrade Path
http://apple20.blogs.fortune.cnn.com/2009/02/25/windows-7-trouble-on-the-upgrade-path/
2. The latest software from Microsoft, Windows 7 is very dysfunctional and hard to upgrade to with Windows XP.
3. -This has happened before going to Windows XP.
-In order to upgrade to Windows 7, you must use Vista.
-This is the first public beta to be released.
-Microsoft has reached over a million call in complaints.
4. They'll eventually fix it like they've done before.
5. This has happened before with Microsoft going to XP, however, that problem was solved a week after its release. Not to mention, Apple has also had these kinds of errors.
6. Nothing was misunderstood
7. Not surprising at all to me.
8. Do you want a Windows 7?
To Stefano: I'd believe the facts for no other reason than that it's better to be safe than sorry.
1. Windows 7: Trouble on the Upgrade Path
http://apple20.blogs.fortune.cnn.com/2009/02/25/windows-7-trouble-on-the-upgrade-path/
2. The latest software from Microsoft, Windows 7 is very dysfunctional and hard to upgrade to with Windows XP.
3. -This has happened before going to Windows XP.
-In order to upgrade to Windows 7, you must use Vista.
-This is the first public beta to be released.
-Microsoft has reached over a million call in complaints.
4. They'll eventually fix it like they've done before.
5. This has happened before with Microsoft going to XP, however, that problem was solved a week after its release. Not to mention, Apple has also had these kinds of errors.
6. Nothing was misunderstood
7. Not surprising at all to me.
8. Do you want a Windows 7?
To Stefano: I'd believe the facts for no other reason than that it's better to be safe than sorry.
Wednesday, February 25, 2009
Chapter 3
1) dim price As Decimal
dim name As String
2) dim height As Decimal
dim width As Integer
dim name As String
3) city = "Miami"
4) dim sales1 As Decimal
dim sales2 As Decimal
dim totalSales As Decimal
totalSales = sales1 + sales2
totalSalesLabel.Text = totalSales
5) dim salary As Decimal
salary = salary * 1.5D
salaryLabel.Text = salary
6) dim employeename As String
'Must be entered in textbox
'Is module level variable
9) isConverted = Integer.TryParse(unitsTextBox.Text, numberOfUnits)
15) A variable whose value does not change during the program.
Chapter 4
7)
If carTextBox.text = "Grand Am" Then
carMakeLabel.text = "Pontiac"
End If
8)
If variable < 0 Then
MessageBox.Show("Entry Error", "Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("Valid Number", "Valid Number", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
9)
If quantity < 10 then
MessageBox.Show("Reorder", "Reorder", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("OK", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
13)
If hours are less than or equal to 40 then multiply hours by hoursRate. Else, subtract forty, multiple the remainder by hoursRate and 1.5. Add 40 time by hourRate.
If hours < 40 Then
gross = hours*hourRate
Else
gross = (hours - 40) * hourRate * 1.5 + 40 * hourRate
End If
1) dim price As Decimal
dim name As String
2) dim height As Decimal
dim width As Integer
dim name As String
3) city = "Miami"
4) dim sales1 As Decimal
dim sales2 As Decimal
dim totalSales As Decimal
totalSales = sales1 + sales2
totalSalesLabel.Text = totalSales
5) dim salary As Decimal
salary = salary * 1.5D
salaryLabel.Text = salary
6) dim employeename As String
'Must be entered in textbox
'Is module level variable
9) isConverted = Integer.TryParse(unitsTextBox.Text, numberOfUnits)
15) A variable whose value does not change during the program.
Chapter 4
7)
If carTextBox.text = "Grand Am" Then
carMakeLabel.text = "Pontiac"
End If
8)
If variable < 0 Then
MessageBox.Show("Entry Error", "Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("Valid Number", "Valid Number", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
9)
If quantity < 10 then
MessageBox.Show("Reorder", "Reorder", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("OK", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
13)
If hours are less than or equal to 40 then multiply hours by hoursRate. Else, subtract forty, multiple the remainder by hoursRate and 1.5. Add 40 time by hourRate.
If hours < 40 Then
gross = hours*hourRate
Else
gross = (hours - 40) * hourRate * 1.5 + 40 * hourRate
End If
Tuesday, February 24, 2009
Review Questions for Chapter 4
- C ~ number> 100 AndAlso number <=1000 is valid for condition
- C ~ firstNameTextBox.Text.ToUpper() = "BOB" checks if the text is bob.
- B ~ 3 is less than 6 and therefore false
- A ~ 10 is less than 12 and therefore true
- A ~ True, 7 is equal to 7 and therefore true
- C ~ Paul will be displayed
- B ~ Jerry
- C ~ Paul
- D ~ Sue
- C ~ Nested selection can exist in either case
- D ~ Case Is > 7 ~ Case 3, 5 ~ Case 1 To 4 all work
- C ~ Paul
- C ~ Paul
- D ~ Sue
- A ~ Advance.NewLine goes to the next line
- D ~ String.IsNullOrEmpty(cityname) checks if it is empty
- C ~ MessageBox.OK means the message box had been seen
- C ~ randomGenerator.Next(9, 55) generates a number between 10 to 55
- C ~ addressLabel.Text = city & ", " & state will print city name, state
- D ~ Both A and B Same reasoning as #11
Wednesday, February 18, 2009
Wednesday, February 11, 2009
Chapter 3 Review Questions
- C ~ Variables are temporary memory locations.
- D ~ All names are valid.
- C ~ Procedure level variables are only known to its own procedure.
- A ~ Literal constant doesn't change while the program is running.
- D ~ Variables can change.
- C ~ Objects is the default value
- B ~ price = 2.89D
- C ~ isConverted = TryParse.Decimal (inputRate, rate)
- A ~ Add and then convert.
- D ~ commission = Convert.ToSingle(sales) * 0.5S
- A ~ Const Rate As double - .09
- C ~ Convert to string
- A ~ ' to comment
- A ~ block level variables are used the most
- C ~ Implicit off
- A ~ Foucs()
- C ~ You need "" around strings.
- B ~ It needs ()
- A ~ Logical error
- C ~ D stands for decimal
Thursday, February 5, 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)
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)
Thursday, January 29, 2009
Monday, January 26, 2009
Application Programmers: a person who codes applications which are made to do a specific task, contrast to a system programmer who sets up entire computer systems.
Instance: An object made from a class
Assembly Language: a linear programming language
Exposed: the accessible attributes and behaviors of an object.
Machine Language: Consists of series of strings of code that only computers can understand. Must have a program written to translate; binary.
Base Class: The starting class of a program that serves to start up and create other classes to run the program.
Form: an eye pleasing to write code
Mnemonics: A shortcut to an action in a program. For example: Ctrl + P is print in Word.
Behavior: Actions that an object reacts to or can do
High level languages: Non-linear programming languages that are more complex than assembly languages
Object: An instance in programming that can makes actions and react to other objects in the system.
Class: A pattern or blue print to the make an object
Object Oriented Programming: Using objects to create a non-linear program to get specific tasks done.
Compiler: A program that translates all high ended code into basic computer language.
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.
Instance: An object made from a class
Assembly Language: a linear programming language
Exposed: the accessible attributes and behaviors of an object.
Machine Language: Consists of series of strings of code that only computers can understand. Must have a program written to translate; binary.
Base Class: The starting class of a program that serves to start up and create other classes to run the program.
Form: an eye pleasing to write code
Mnemonics: A shortcut to an action in a program. For example: Ctrl + P is print in Word.
Behavior: Actions that an object reacts to or can do
High level languages: Non-linear programming languages that are more complex than assembly languages
Object: An instance in programming that can makes actions and react to other objects in the system.
Class: A pattern or blue print to the make an object
Object Oriented Programming: Using objects to create a non-linear program to get specific tasks done.
Compiler: A program that translates all high ended code into basic computer language.
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.
Wednesday, January 21, 2009
Subscribe to:
Posts (Atom)