Thursday, February 5, 2009

Work From 2-05-09

Data Type- determines the type of data a variable can store.

Boolean Variables – computer memory locations where programmers can temporarily store data while an application is running.

String – a group of characters enclosed in quotation marks

Method – a specific portion of the class instructions and its purpose is to perform a task for the class

Import System. Globalization – imports the System. Globalization namespace, which contains the definitions for the numberStyles and numberFormatInfo.CurrentInfo values

Floating point- is a number that is expressed as a multiple of some power of 10

Unicode – the universal coding scheme for characters

Identifier- the name of an object

Dim – dimension; A method to declare a variable in Visual Basic.

Literal constant - an item do data whose value does not change while the application is running

Literal type character - a character used to convert a literal constant to a different data type

TryPase Method – a method used to convert a string to that numeric 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

Convert class - this class contains methods that return the result of converting a value to a specified data type

Precedence Numbers – indicate the order in which the computer performs an operation (such as an arithmetic operation) in an expression

Operators-mathematical symbols used in calculations, +-*/

Scope- indicates where a variable can be used in the application’s code.

Lifetime - indicates how long a variable remains in the computer’s internal memory
Procedure scope - the scope of a procedure-level variable

Comments – used to document a program internally; created using the apostrophe

Module scope- refers to the scope of a model-level variable, which can be used by all of the procedures in the current form

Block scope - the scope of block-level variables, which can be used only within the statement block in which they are declared

Static variable – a procedure-level variable that retains its value when the procedure ends

Option Explicit – Disables implicit declaration of variables

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.

Pseudocode - uses phrases to describe the steps a procedure needs to take to accomplish its goal

Empty String – a set quotations marks with nothing between them; also called a zero-length string

Focus method- used to move the focus to a control while an application is running

Format specifier - determines the special characters that will appear in a formatted number.

Questions:

How do you name a variable and provide one example.

-You can name it in a way that it doesn’t conflict with other commands. (no spaces or special characters) EX: RedBikes

How do you declare a variable and provide one example.

-You can declare a variable by using the DIM command. EX: Dim RedBikes As Integer

What is the difference between DIM and Const?

-Dim is a variable that can be changed, while Const is a variable that is only named once and it stays the same. EX: Const TaxtRate As Decimal = 0.10D

How do you include a mathematical expression in assignment statements?

-you use variables. totalSkate= RedBikes + BlueBikes

How do you clear the text property when application is running?

-you use the clear function. redTextBox.Clear()

How do you format a number for output as a string?

-You use the convert.Tostring function. EX: totalBoardsLabel.Text = Convert.ToString(totalSkateBoards)

No comments:

Post a Comment