Sunday, February 20, 2011

Chapter 4 Summary

4.1
Code is executed sequentially, so it's order is significant to how the program executes. Using a decision structure, programs can execute different exceptions within the code. Conditionally executed is an action when a program executes different results when a user-driven decision is made. (Example: the book uses the "wear a coat" action if the user says it is cold outside. If the user clicks "no" instead, the "wear a coat" action is skipped over. These actions are only performed under a certain condition. These are known as "If...Then" statements.

4.2 The If...Then Statement
If...Then: causes other statements to execute only when an expression is true.
Looks something like:
"If expression Then
     statement
     (more statements may follow)
End If".
Basically tells the program that if the initial expression is true, then the statements between the If...Then and the End If are executed. Otherwise, they are skipped if the expression is false. Boolean expression is the term for the initial expression, as they can either be true or false.

Relational Operator: determines whether a specific relationship exists between two values.
Example: X>Y means is x greater than y?
The "=" operator in this case determines whether the operand on the left is equal to operand on the right.

See the test score example on page 210 to see the If...Then statement in use.

You can use math operators alongside relational operators, such as
"If intX+intY>20 Then
     lblMessage.Text="It is true!"
End If
Math operators are always performed before relational operators when they are in the same expression.

Relational operators can be used alongside function calls as well.

-Boolean variables can also be used as "flags", which signals when some condition exists in the program, either as "true" or "false".

4.3 If...Then...Else Statement
Looks like:
If condition Then
   statement
   more statements
Else
   statement
End If

Like the original If...Then statement, a Boolean expression is still evaluated. The "else" statement tells the program what to execute if the Boolean expression turns out to be false instead of true.

example:
If dblTemperature<40 Then
   lblMessage.Text="A little cold, isn't it?"
Else
   lblMessage.Text="Nice weather we'r having!"
End If

4.4 If...Then...ElseIf Statement
Example: When we decide to wear a jacket, we might think in terms of:
-If it is very cold, wear a heavy coat
-Else, if it is chilly, wear a light jacket
-Else, if it is windy, wear a windbreaker
-Else, if it is hot, wear no jacket

That type of decision making is the equivalent "If...Then...ElseIf" statements. Looks like:
If condition Then
   statement
ElseIf condition Then
   statement
(as many "ElseIf statements can be put here)
Else
   statement
End If

It's set-up like a chain, with the Else part of one statement being linked to the If part of another. All the "ElseIf" statements make up all the possibilities that need to be tried. See pg. 218 for the example.

4.5 Nested If Statements
Nested If Statement: is an If statement that appears inside another If statement.

Example: Loan Qualifier.
-The outermost "If" is testing the following the expression "If dblSalary>30,000 Then"
-If this is true, the nested if statement is executed, shown in bold.
If dblSalary>30000 Then
    If intYearsOnJob>2
        lblMessage.Text="The applicant qualifies."
    Else 
        lblMessage.Text="The applicant does not qualify."
    End If
Else
    If intYearsOnJob>5 Then
        lblMessage.Text="The applicant qualifies."
    Else
        lblMessage.Text="The applicant does not qualify."
    End If
End If
                                   
-However, if expression dblSalary>30000 isn't true, the Else part of the outermost If statement causes the nested If statement to execute, shown in bold.

Else
    If intYearsOnJob>5 Then
        lblMessage.Text="The applicant qualifies."
    Else
        lblMessage.Text="The applicant does not qualify."
    End If
End If

4.6 Logical Operators
Logical Operators: combine two or more Boolean expressions into a single expression.
Examples:
And: combines two expressions into one. Both must be true for the overall expression to be true.
-"AndAlso" can be used to achieve short-circuit evaluation (basically, if the first part of the "And" operator turns out to be false, Visual Studio can skip over the second part as the entire expression is false regardless).
Or: combines two expressions into one. One or both expressions must be true for the overall to be true.
-"OrElse" can be used to achieve short-circuit evaluation (in this case, if the first part is true, Visual Studio can now skip the second part as the entire expresssion is true regardless).
Xor: combines two into one. One expression (not both) must be true for the overall to be true. If both are true (or both flse), then overall is false.
Not: reverses the logical value of an expression: makes a true expression false and a false expression true.

Logical operators can be used to check numerical ranges. Example:
If intX>=20 And intX <=40 Then
   lblMessage.Text="The value is in the acceptable range."
End If

The If statement would only be true if the value is greater than 20 and less than 40.

An Or statement would be:
If intX<20 Or intX>40 Then
   lblMessage.Text= "The value is outside the acceptable range."
End If
This checks if th number is either less than 20 or greater than 40. If it is either one of those ranges, it's outside the acceptable range. Make sure to use the right operator, if you used And instead of Or, you'll get an error as no value exists that is both greater than 40 and less than 20.

You can use these statements together, such as:
If intX<0 and intY>100 Or intZ=50 Then
   statement
End If

4.7 Comparing, Testing and Working with Strings
Example:
strName1="Mary"
strName2="Mark"
If strName1=strName2 Then
   lblMessage.Text="The names are the same"
Else
   lblMessage.Text="The names are NOT the same"
End If

The "=" operator tests whether the strings are equal. "<>" ">" "<" "<=" ">=" can also all be used to test strings. You can use the greater than/less than operators because computers don't store characters as "A, B, C", they are stored as a numeric value. Because A comes before B, the numeric code for A is less than B, and so on.

You can test for whether a user has entered text into a text box by comparing the the text property to the predefined constant "String.Empty".

You can use the ToUpper/ToLower methods to change the case of the string. Example:
strLittleWord="Hello"
strBigWord=strLittleWord.ToUpper( )
This will turn "Hello" into "HELLO", and vice versa if .ToLower( ) is used instead.

IsNumeric Function
-Tests if a string contains a numeric value, true if it does, false if it doesn't.
"IsNumeric(StringExpression)"

Length Property
-Returns the number of characters in a string. Example:
"Herman" will be stored as the number 6, because there are 6 characters.
Dim strName As String="Herman"
Dim intNumChars As Integer
inNumChars=strName.Length

Can also determie length of a control's text property, using ControlName.Text.Length.

Trimming Spaces
You can trim leading/trailing spaces from strings using the StringExpression.TrimStart( ), StringExpression.TrimEnd( ), or StringExpression.Trim( ) methods.

You can trim spaces on a control's text property by using txtName.Text.Trim( ).

SubString Method
-Can be used to return a string within the string.
StringExpression.Substring(Start)
StringExpression.Substring(Start,Length)

Start refers to the character position (first character is 0, and so on).
The second method will give you exactly what you enter (the starting position and how many characters), and the first one will start at the position you give it and return all the characters that start from that position to the end of the string.

IndexOf Method
-Also first character position is 0 and so on.
-This searches for a character/string within a string.
Example:
Dim strName As String="Angelina Adams"
Dim intPosition As Integer
intPosition=strName.IndexOf("e")
This will return the integer "3" as "e" is in the third character position (remember first is 0)

Example:
Dim strName As String="Angelina Adams"
Dim intPosition As Integer
intPosition=strName.IndexOf("A", 1)
This will give the integer "9", as the 1 is telling the method to start at the first character position ("n") and to search for a capital A (a lowercase a and a capital A are different, keep this in mind). The "A" in Adams is in the 9th character position.

Example:
Dim strName As String="Angelina Adams"
Dim intPosition As Integer
intPosition=strName.IndexOf("A", 1, 7)
This will return the position of "-1", meaning the character position was not found. The 1 tells it where to start from in the string ("n" again) and to only search 7 character positions after the 1st character position. "A" is not found, so it returns -1.

4.8 More About Message Boxes
Here are different forms of message boxes.

MessageBox.Show(Message)
-This displays a message.
MessageBox.Show(Message, Caption)
-This displays a message, and "Caption" refers to what you want the title bar to display.
MessageBox.Show(Message, Caption, Buttons)
-This diplays a message, "Caption" is the title bar, and now you can choose what buttons you want using one of these:
-MessageBoxButtons.AbortRetryIgnore
-MessageBoxButtons.OK
-MessageBoxButtons.OKCancel
-MessageBoxButtons.RetryCancel
-MessageBoxButtons.YesNo
-MessageBoxButtons.YesNoCancel
These are pretty self-explanatory.
MessageBox.Show(Message, Caption, Buttons, Icon)
-This displays your message, your title bar caption, whatever button you selected, and you can choose the Icon(either an asterisk/"i" for information will be before your message, or an "x" or a "!" in a triangle, or a question mark) using:
-MessageBoxIcon.Asterisk
-MessageBoxIcon.Error
-MessageBoxIcon.Exclamation
-MessageBoxIcon.Question
Check page 243 for more.
MessageBox.Show(Message, Caption, Buttons, Icon, DefaultButton)
-Displays your message, displays your title bar caption, displays the buttons, displays the icon, and now chooses what button is the default (i.e. what button is clicked if the user presses "enter")
-MessageBoxDefaultButton.Button1
  -Selects the leftmost button.
-MessageBoxDefaultButton.Button2
   -Selects second button from the left.
-MessageBoxDefaultButton.Button3
   -Selects third button from the left.

Determining Which Button The User Clicked
Now that you have your message box, use If...Then...ElseIf statements to tell the program what to do in case of the button click. It's not an event handler for message boxes as Visual Studio returns specific values in case of a message box button click.

Example:
Dim intResult As Integer
intResult=MessageBox.Show("Do you wish to continue?", "Please Confirm", MessageBoxButtons.YesNo)

If intResult=Windows.Forms.DialogResult.Yes Then
   'Perform some action here
ElseIF intResult=Windows.Forms.DialogResult.No Then
   'Perform some action here
End If

See pg. 244 for more details.

4.9 Select Case Statement
Much like "If...Then...ElseIf" (this performs a series of tests and branches when one of the tests is true) statements, this tests the value of an expression only once and then uses that value to determine which set of statements to branch to.

Example:
Select Case CInt(txtInput.Text
   Case 1
      MessageBox.Show("Day 1 is Monday.")
   Case 2
      MessageBox.Show("Day 2 is Tuesday.")
   Case 3
      MessageBox.Show("Day 3 is Wednesday.")
   Case 4
      MessageBox.Show("Day 4 is Thursday.")
   Case 5
      MessageBox.Show("Day 5 is Friday.")
   Case 6
      MessageBox.Show("Day 6 is Saturday.")
   Case 7
      MessageBox.Show("Day 7 is Sunday.")
   Case Else
      MessageBox.Show("That value is invalid.")

Basically, this compares the integer of CInt(txtInput.Text) to whatever number case. If the integer is 3, it'll go through all the cases until it gets to case 3 and display the message box "Day 3 is Wednesday".

4.10 Input Validation
-The process of inspecting input values and determining whether they are valid.
-Now that we have If...Then statements, we can determine if a specific value can be converted to a specific data type before we try to convert it.

Methods:
-Integer.TryParse: Two arguments, string (argument 1) and integer variable (argument 2). Attempts to convert string to an integer. If successful, method returns true. If not, returns false.
-Double.TryParse: Tries to convert string to double. If successful, returns true. If not, returns false.
-Decimal.TryParse: ^
-Single.TryParse: ^
-Date.TryParse: ^

Etc.

4.11 Radion Buttons/Check Boxes
-All radio buttons inside a group box are members of the same group.
-All radio buttons on a form not inside a group box are members of the same group.
-Have a text property.
-Have a CheckedChanged event that is triggered when a user selects/deselects a radio button. Double-click on one to create the code.

Example:
If radChoice1.Checked=True Then
   MessageBox.Show("You selected Choice 1")
ElseIf radChoice2.Checked=True Then
   MessageBox.Show("You selected Choice 2")
ElseIf radChoice3.Checked=True Then
   MessageBox.Show("You selected Choice 3")
End If

You can use code to select a radio button, using an assignment statement to set the desired radion button's Checked property to "True":
radChoice1.Checked=True.

Check Box
-Text property for caption
-When it has focus, can be checked or unchecked using the spacebar
-Can use code to select or deselect a check box.
   -chkChoice4.Checked=True
-Have event handlers when checked/unchecked like radio buttons.

4.12 Building The Health Club Membership Fee Calculator Application
Look in the book, complete the example.

Saturday, February 12, 2011

Chapter 3 Summary

3.1
Gathering Text Input
Text box-rectangular area on a form that accepts keyboard input.
You can access the Text property of a TextBox control just like you would access any other properties.
(ex. txtInput.text)

To clear a text box, we use the formula of "Object.Method", object  being the name of the object and method being the name of the method being called. In this case, it would be TextBoxName.Clear( ). This clears any input in that specific textbox.

Another way of clearing a text box is using "String.Empty" to clear the contents. In this case, we'd use an operator in the code. TxtBoxName.Text=String.Empty

String Concatenation
String concatenation is a way of combining different elements of input by using an operator. The ampersand (&) operator is used to combine two different inputs.

Example: lblMessage.Text = Good Morning " & "Charlie". This would assign "Good Morning Charlie" to the text property of the lblMessage control. Make sure to include the proper spaces in the code, or else the text may end up reading "GoodMorning Charlie" or "GoodMorningCharlie".

Aligning Controls in Design Mode
This section talks about the various methods and tools used to properly align controls on a form. Whenever a control is aligned with another control, certain color guide lines appear.

Blue guide line: Controls are aligned vertically.
Lavender guide line: Controls are aligned horizontally.

Both lines can appear at the same time too. This takes a lot of the guesswork out of making sure everything is properly aligned in a visually appealing manner.

The Focus Method
Focuse: The control that is receiving user input. One control at any time always has the focus when a program is running.

To tell what control has the focus in realtime, look for several different signs. If a text-box has a blinking cursor, it has the focus. If a button has the focus, it'll have a thin dotted line around it.

To actively assign a control the focus (in the book tutorial, it showed how to make a text-box cursor flash again after all text-boxes had been cleared), we can call the focus method. To do this, we use "ControlName.Focus( )".

TabIndex
Just like on a webpage, pressing the tab button shifts the focus around to different controls. The order this goes in is known as the tab order. By default, the tab order is assigned in the order in which you created the controls. However, this might not always be the exact order you'd like (due to rearragning, deleting, adding new controls, etc). You can modify the tab order by using the TabIndex Property. Each control is assigned a number which indicates its order. By changing this, you can change the tab order. An easier way of changing each TabIndex Property (instead of individually changing all) can be found by clicking "View" on the menu bar, and then "Tab Order". This displays the form in tab order selection mode, where you can click on the specific order you'd prefer.

If you don't want a control to get the focus when cycling through the tab order, assign it's TabStop property to "false".

Assigning Keyboard Access Keys to Buttons
Access Key: Also known as "mnemonic", is a key pressed in combination with the alt key. You can assign an access key to a button through its Text property. Book Example: A text property is set to "exit" for a button. To assign the access key "Alt+X" to close the application, change "Exit" in the text property to "E&xit".

Accept Button: is a button that is automatically clicked when "Enter" is pressed.
Cancel Button: is a button that is automatically clicked when "Esc" is pressed.

3.2
Variables/Data Types
Variable: a storage location in computer memory that holds data while a program is running. It's basically name which you assign that represents a location in the computer's RAM. Example: "intLength=112" stores the value 112 in that variable.

Variable Declaration: is a statement that creates a variable in memory when a program executes.
The general form for this is "Dim VariableName As DataType" Book Example: Dim intLength As Integer.
-Dim tells VB that a variable is being declared.
-intLength is variable name.
-Integer indicates the data type. Integer is used to hold numbers. To declare multiple variables, use commas in-between each VariableName.

Variable Names: Rules: 1) First character must be letter or an underscore. 2) May use letters, numberic digits, and underscores after first character (no spaces,periods, or other punctuations). 3) Names cannot exceed 1023 character. 4) Names cannot be already established VB Keywords.

Type Prefix: Generally a good idea for future reference to start with a type prefix. We already do this when naming controls, i.e. a text-box we use "txt" before the name. See table 3-1 on page 124 for more details.

Assigning Values to Variables: Use the = operator to assign variable names to values. Example: inUnitsSold = 20.

Integer Data Types: Integers are whole numbers.
-Byte: holds a vaue ranging from 0-255
-Short: Value range of -32,768-+32,767
-Integer: Value range of -2,147,483,648-+2,147,483,647
-Long: Ridiculous value range.

More in-depth breakdown, see pages 126-131.

Default Values/Initialization
When a variable is assigned, it's given a default value. An integer variable is automatically assigned "0". To initalize it, you can specify a starting value using the dim statement, ex: Dim intUnitsSold As Integer = 12.

Local Variable: When a variable is declared inside of a procedure (such as an event handler) it is referred to as a local varaible. An error will occur if one procedure attempts to access a local variable of another procedure.

Scope: refers to the part of a program in which a variable may be accessed. Restates the local variable bundaries. Different scopes allow for variables to have the same names.

3.3
Performing Calculations

Binary Operator: works with two operands. Example: 5 + 10 adds the values of two numbers.
Different operating signs include subtraction (-), multiplication (*), floating-point division (/) integer division (\), and exponentiation (^).

Date/Time
To get the date/time of the computer, you can use the dim statement to bring up either date, time, or both.

"Dim dtmSystemDate=Now" brings up the current date and time of the system.

All of the other calculations would be tedious to write down, so read this section!

This is getting too long, so I'll just pick key topics from the other sections

Type Conversion: This occurs when assigning various things to variables. When a variable is assigned, VB tries to convert it to another data type. For example, assigning a real number (12.5) to "intCount", VB will convert it to an integer variable, rounding up to 13.

Option Strict: Only widening conversions are allowed, where no data is lost.

Function: special type of procedure where data is sent to the function as input. The function performs an operation on the data, then sends it back as output.

Exceptions: These are ways to recover from errors beyond a programmer's control (i.e. the user inputs wrong data). To "gracefully" recover from these, exception handlers are used.

A try-catch statement is the format used for exceptions. These are formatted as
Try
    Statement
    Statement
Catch
    Statement
    Statement
End Try

These execute in the order that they appear in. If a statement in the try block causes an exception, it'll jump to the catch clause and execute a statement from there.

In the book example, the user entered "four thousand" instead of a numerical value. This threw an exception for the try clause, and jumped to the catch clause, which saved the error.

I started writing this blog as I was reading through the chapter. I had no idea how long this chapter was, so about half-way through I realized it'd be pointless to cover every single thing. I'll make sure to just cover the major points in Chapter 4.

Monday, February 7, 2011

Chapter 2 Summary

2.1 Focus on Problem Solving

1) Clearly define what the application is to do.
This can be accomplished by filling out this simple formula:
-Purpose:
-Input:
-Process:
-Output:

2) Visualize the application running on the computer and design its user interface.
Before the coding process starts, draw a few sketches of what you visualize the GUI will look like and how the user will interact with the program.

3) Determine the controls needed.
Make a list of all the controls, such as forms, labels, picture boxes, buttons, etc.

4) Define the values of each control's relevant properties.
For each control, write out the properties associated with the its function.
Ex. Form
Name: Form1
Text: "Directions"

5) Start Visual Basic and create the forms and other controls.
This is where you start creating your program in Visual Basic. Remember to follow the instructions from Chapter 1 on the rules for naming different controls (i.e.if you're calling up the control in your code, make sure to change the name to describe it's function. It'll be easier to understand your code later).

Design Mode: This is the mode where you create an application. Also known as "design time".

Run Mode: This lets you execute the program in Visual Basic. You can either click the F5 key, click "Debug", or press the play button (Start debugging).

Break Mode: This allows you to suspend a running application for test/debug purposes.

Closing a project: To close your current project, click file on the menu bar and then "close project".

Solutions/Projects: A solution is a container that holds Visual Basic projects. Every Visual Basic project you create has its own solution.

Save Project: When you save your project, a folder you title will be created where the solution is stored.
Contents of Solution Folders: The solution file itself is saved as a ".sln" file. Other various file-types, such as ".vbproj" are saved here. We don't need to interact with these files, but Visual Basic must have these to read/access a project.

Open project: Click file, then open project.

Properties window: The box that appears at the top of the Properties window shows the name of the selected control. Known as the "object box".

Alphabetical Button: Click this and all controls are displayed in alphabetical order.

Categorized button: Click this and all controls are displayed according to category.

2.2 Focus on Problem Solving: Responding to Events
In the book, we added an event handler to display directions when the "Display Directions" button is clicked. The label (where the text is written) is always present on the program, but is invisible when the button hasn't been clicked. This is because the Visible property has been set to "false" (it's a Boolean property, meaning it can only be "true" or "false"). You can change the visible property by finding it in the properties window. After changing the names of both the button and the label, double-click the button to get to the code. In the space, type "lbldirections.Visible=True". This will tell the program to set the visible property of the "lbldirections" to true once the button is clicked. This works because this is known as an assignment statement. The equal sign is the assignment operator. What this does is it assigns the value that appears on the right side of the equal sign (true) to the item that appears on the left side (lbldirections). It must be in that formula, or the assignment operator will not work.

To close the application by the click of a button (and not the Windows "X" button), double-click the button to again access the code. Type in "Me.Close( )". This is known as a method call. Me is a keyword that refers to the current form. On the right side of the period, the keyword Close is the name of the method that you are calling. The set of parentheses always appear after the name of the method in a method call.

Comments: Comments are important when writing code as they'll help you understand what each line of code is doing. To write comments without breaking code, put an apostrophe (') at the start of a line of code. This tells the compiler to ignore everything after the apostrophe.

Changing Text Colors: Font style/size can be changed through the properties window, but to change the text background and foreground color, use the BackColor and ForeColor properties.

FormBorderStyle Property: This property lets you customize how the user interacts with the program. You can prevent the user from resizing, minimizing, maximizing, or even closing a form with the Close (X) button.

Locking Controls: Right click over an empty spot on the form and right-click. Click "Lock Controls" to lock their place to the form.

Intellisense: Much like Google trying to guess what you're typing and giving suggestions, Visual Basic will give you a drop down list with potential code that you're writing.

2.3 Modifying a Control's Text Property with Code
To change text while a program is running, call up the control in code and use an assignment statement. Example: lblMessage.Text="Programming is fun!". This will change the control "lblmessage" text property to the new text when it is executed. The quotation marks are known as a string literal.

2.4 AutoSize, BorderStyle, and TextAlign
AutoSize Property: It's a Boolean property that is set to true by default. This will auto resize a label's bounding box to accommodate the text. If set to false, you can manually change the bounding box.

BorderStyle Property: Has three settings 1) None (no border) 2) FixedSingle (single-pixel-wide border) and 3) Fixed3D (recessed 3D appearance).

Text Alignment: Change the TextAlign property to change the alignment in a control. You can do this with the Properties Window, or with code by using an assignment statement such as "lblReportTitle.TextAlign=ContentAlignment.TopLeft".

2.5 Displaying Message Boxes
Message Box: A small window, referred to as a Dialog Box, that displays a message. "MessageBox.Show("Hello World!")" is a method call to bring up a message box.

2.6 Clickable Images
Just as buttons can have click-event handlers, other controls such as PictureBoxes and labels can also have click-event handlers.

In the book, the example was clicking on a picture of the USA flag to display the text "United States of America". To do this, click the image to access the code page. Then write "lblMessage.Text="United States of America".

2.7 Using Visual Studio Help
The MSDN Library contains a ton of information about Visual Studio and Visual Basic. Context-sensitive help aids in finding information about what you are currently working on. Pressing F1 while selecting an item will bring up a browser, displaying help on the selected item.

2.8 Debugging Your Application
Compile Errors: These are syntax errors (i.e. there is some error in your written code). Each programming language has its own syntax as you recall from Chapter 1. Each compile error is underlined with a jagged blue line. Review your code and make corrections.

Runtime Errors: Errors found while the application is running. These are not syntax errors, but results from attempting to execute an operation that Visual Basic can't execute.

Tuesday, February 1, 2011

Chapter 1 Summary

1.1 Computer Systems
Computers are made up of a combination of devices, with each component carrying out different tasks. The term "hardware" refers to the physical components inside the computer tower.

Hardware:
1) The central processing unit (CPU) is basically the brain of the computer. Without a CPU, a computer would not function/be able to run any software (OS and application software).

2) The main memory of the computer is RAM (random-access memory). This is the memory where everything you're doing at a given moment on the computer is stored as a short-term position for the CPU to easily access it whenever it needs to. Anything stored here is erased when the computer is shut off, so make sure to save whatever you're working on. More RAM=a more efficient (faster) computer.

3) Secondary storage refers to any solid-state, disk-drive, USB flash drive, or any sort of medium like CDs/DVDs that can be used to store data.

4) Input devices can be any device where data is being sent to the computer through an outside world input. A keyboard, mouse, scanner, etc can be considered an input device.

5) Output devices are anything a computer sends to the outside world such as a printer, monitor, and disk drives.

Software:
Operating Systems: Without an Operating System, a computer would not know what to do. All the components may be present, but without an OS, none of these devices have any instructions and none of the processes would be executed.

Application Software: Any application that a user interacts with. Word processing, spreadsheets, powerpoint, video games, etc are all application software.

1.2 Programs/Programming Languages
Key Terms:
-A program consists of specific instructions that enables a computer to perform a task.
-An algorithm is a set of well-defined steps for performing a task. These are specific, sequentially ordered tasks that the computer follows.
-A compiler turns programming languages(C#, C++, VB, etc) statements into machine code.
-Keywords are specific words/reserved words that make up programming languages.
-Operators are like keywords in that they are specific characters that perform operations on data (ex. a + sign is an operator).
-A variable is a storage location in memory that is represented by a name. It's name (a single word) indicates what it is used for, but we'll learn more about this in later chapters.
-Each programming language has its own set of rules that must be strictly followed. This set of rules is known as syntax.
-Statements are the individual instructions that a programmer writes when coding a program.
-Procedures are the sets of programming statements for the purpose of performing a task. The program executes the procedure when the task is needed.
-An object is essentially any "thing" that has data and can perform operations. The data is known as properties/attributes and the operations an object can perform is known as its methods.
-A control is a specific type of object that appears in a program's GUI (graphical user interface). Elements in the GUI, such as a label or a textbox, are controls.
-Properties are pieces of data that defines the characteristics of the controls.

 Event-Driven Programming: Basically, any sort of program that a user can interact with requires some sort of "action" to make it run. Clicking a button is an event. You must code event handlers to tell the program what to do in case of events, or else clicking a button would give no results.

Programming Languages: Computers are able to process whatever instructions we give it through it's own language, known as "machine language instructions". This is what is called binary code, which is made up of 1s and 0s. Different programming languages, such as C++ and Visual Basic, make it easier for humans to write programs. Once the code is finished, a "compiler" turns that code into binary code for the computer to read.

1.3 More About Controls
This section mainly goes over what we just covered about controls, but gives detailed descriptions for everything as well as showing visuals to help in understanding. It also delves further into the topic of controls, naming them being the most prominent. Control names should be changed to indicate what they are when they are an active part in the application's event handlers. The book used the examples of "txtPayRate" to label the control that allows the user to enter their hourly pay rate in the Wage Calculator program.

1.4 The Programming Process
The most important aspect when thinking of a program is figuring out what you want it to do. Find out the purpose, input, process, and the output of the program before trying to code. Without proper planning, you'll run into problems you could have avoided if you had planned ahead.

Drawing a mock sketch or even drawing a flowchart of events will also help you further visualize your program. Pseudocode is a way of jotting down initial code that is mostly english before you start writing the programming code. Once you've written the code, check for any errors (runtime and statement errors).

1.5 Visual Basic
Visual Studio is a pretty awesome program. It can do quite a bit and this section initially starts breaking down all the tools and features. The toolbar contains prety much everything you need to write a program. The solution explorer and the properties window are both present at any time to the right when you're working on a program. The solution explorer window displays any project you're working on, including the current one. The properties window is used to examine any control properties. It would be way too tedius and my post would end up being way too long if I detailed every aspect about this program, but all of you get the gist of it from reading the chapter.