Variables and Constants Flashcards

1
Q

employeeNumber

Is this a proper variable name?

A

employeeNumber

Yes, the name of this variable is in standard camelCase.

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

EmployeeNumber

Is this a proper variable name?

A

EmployeeNumber

No, this is NOT a variable. The name is not camelCase.

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

USER_NAME

Is this a proper variable name?

A

USER_NAME

No, this is NOT a variable name. It’s a constant.

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

userName

Is this a proper variable name?

A

userName

Yes, the name of this variable is in standard camelCase.

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

SalaryType

Is this a proper variable name?

A

SalaryType

No, this is NOT a variable. The name is not camelCase.

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

CEOname

Is this a proper variable name?

A

CEOname

No, this is NOT a variable. The name is not camelCase.

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

employee_number

Is this a proper variable name?

A

employee_number

No, this is NOT a variable. The name is not camelCase.

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

companyNAME

Is this a proper variable name?

A

companyNAME

No, this is NOT a variable. The name is not camelCase.

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

collegeName

Is this a proper variable name?

A

collegeName

Yes, the name of this variable is in standard camelCase.

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

myschoolname

Is this a proper variable name?

A

myschoolname

No, this is NOT a variable. The name is not camelCase.

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

USER_NAME

Is this the name of a constant?

A

USER_NAME

Yes, this is a constant. It is named using the UPPERCASE naming convention.

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

nameOfPlayer

Is this the name of a constant?

A

nameOfPlayer

No, this is a variable, named using the camelCase naming convention.

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

numberOfOrcs

Is this the name of a constant?

A

No. This is a variable, named using the camelCase naming convention.

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

NUMBER_OF_EMPLOYEES

Is this the name of a constant?

A

NUMBER_OF_EMPLOYEES

Yes, this is a constant. It is named using the UPPERCASE naming convention.

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

PLAYER_NAME

Is this the name of a constant?

A

PLAYER_NAME

Yes, this is a constant. It is named using the UPPERCASE naming convention.

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

PLAYER-NAME

Is this the name of a constant?

A

PLAYER-NAME
No, this is not a constant. The hyphen is not used in naming constants. It should be named PLAYER_NAME with an underscore

17
Q

PLAYER NAME

Is this the name of a constant?

A

No. This is either two constants, or it is one constant missing an underscore. It should be: PLAYER_NAME

18
Q

DEFAULT_RATE

Is this the name of a constant?

A

DEFAULT_RATE

Yes, this is a constant. It is named using the UPPERCASE naming convention.

19
Q

country

Is this the name of a constant?

A

country

No, this is a variable named using the camelCase naming convention.

20
Q

mySchool

Is this the name of a constant?

A

mySchool

No, this is a variable named using the camelCase naming convention.

21
Q

TEAM_NAME

Is this the name of a constant?

A

Yes, this is a constant. It is named using the UPPERCASE naming convention.

22
Q

DOG_NAME

Is this the name of a constant?

A

Yes, this is a constant. It is named using the UPPERCASE naming convention.