Chapter 3 Flashcards

1
Q

Variables

A

An internal place where the computer temporarily stores data..contents can change as the program is running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Every Variable has a data type, ….?

A

name, scope, and lifetime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The variable data type determines….?

A

the type of data the variable can store.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Each data type is a __________?

A

Class..which means that each data type is a pattern from which one or more objects are created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Data Type: Boolean-Stores?

A

A logical value, true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Data Type: Char-Stores?

A

One Unicode character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Data Type: Date-Stores?

A

date and time info
date range: January 1, 0001 to December 31, 9999
time range: 0:00:00 midnight to 23:59:59

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Data Type: Decimal-Stores?

A

a number with a decimal place

+/- -7.982342343453264564364363234

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Data Type: Double-Stores?

A

a number with a decimal place

+/- -1.79442665463464636

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Data Type: Integer-Stores?

A

integer

-2 kabillion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Data Type: Long-Stores?

A

integer

-9 kabillion to +9 kabillion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Data Type: Object-Stores

A

data of any type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Data Type: Short-Stores

A

integer

range -32,768 to 32,767

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Data Type: Single-Stores?

A

a number with a decimal place

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Data Type: String-String?

A

text; 0 to 2 billion characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

These data types store whole numbers

A

Integer: -2 billion to 2 billion
Long: -9 kabillion to +9 kabillion
Short: -32, 768 to 32, 767

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

These data types store numbers with decimal places

A

Decimal is largest and used for money
Double (first two most commonly used)
Single

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

This data is the most general and most taxing on computer

A

Object data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Most common data type used for whole numbers

A

Integer, even if short works

20
Q

A variables name is also called an _______?

A

Identifier: Describes the contents of the variable

21
Q

Boolean ID = ?

22
Q

Decimal ID = ?

23
Q

Double ID = ?

24
Q

Integer ID = ?

25
String ID = ?
str
26
Variable Declaration Statement
Dim/Private/Static variableName As dataType [= initial value] Ex. Dim intNumSold As Integer Dim blnInsured As Boolean = True
27
A variable is an object? T/F
True
28
A variable is an instance of the class specified in the dataType info? T/F
True
29
Literal Constant
item of data whose value does not change while the application is runing
30
Syntax for assigning a value to a variable?
``` variableName = expression intNumber = 25 ```
31
The TryParse method converts a __________ to a number?
String
32
Explain what this does: | Double.TryParse(txtDue.Text, dblDue)
If the string contained in the txtDue controls's Text property can be converted to a Double number, the TryParse method converts the string and then stores the result in the dblDue variable, otherwise, it stores the number 0 in the variable
33
Explain what this does: | decorate = Convert.ToDecimal(.15)
Converts the Double number .15 to decimal and then assigns the result to the decRate variable
34
Explain what this does: | decBonus = decSales * Convert.ToDecimal(.05)
Converts the double number .05 to decimal, multiplies it by the contents of the decSales variable and assigns it to the decBonus variable
35
A variable's scope indicates where the variable can be ____________ in an applications code.
used
36
A variable's lifetime indicates how _________ the variable remains in the computers internal memory
long
37
Procedure level variable are designated with the keyword ________?
Dim
38
Class-Level Variables are designated with the keyword ___________?
Private
39
Const intLIMIT As Integer = 70 means what?
Declares intLIMIT as an Integer named constant and initializes it to the integer 70... it is all uppercase to distinguish between a variable
40
Class Scope
a variable that can used by any procedure within the form
41
Convert Class
contains methods that return the result of converting a value to a specified data type
42
Forms Declaration Section
Located between the public class and end class clauses
43
Implicit type conversion
process by which a value is automatically converted to fit the memory location to which it is assinged
44
Literal Constant
an item of data whose value does not change during run time
45
literal type character
a character such as the letter d, appended to a literal constant for the purpose of forcing the literal constant to assume a different data type such as decimal