Module 2.1/5.1 Flashcards

1
Q

block of code that performs a specific task.

A

method

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

specifies what type of value a method returns.

A

returnType

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

It is an identifier that is used to refer to the particular method in a program.

A

methodName

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

It includes the programming statements that are used to perform some tasks. is enclosed inside the curly braces { }

A

method body

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

act as variables inside the method.

A

Parameters

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

They are specified after the method name, inside the parentheses.

A

Parameters and Arguments

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

When a parameter is passed to the method,

A

Argument

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

multiple methods can have the same name with different parameters

A

method overloading

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

it continues in a linear fashion one statement after the next until the end of your program is encountered

A

Simple Sequence

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

used for decision-making and allows your program statements to deviate from the sequential path and perform different statements based on the value of an expression

A

Selection Statement

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

looping enables you to write instructions that can be repeated

A

Iteration

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

● also referred to as a test condition
● When you write an expression to be tested, you must first determine the operands.
● Unless a bool data type is used, two operands are required for equality and relational tests.
● You saw this same requirement of two operands when you used binary arithmetic operators such as multiply * and divide / to perform multiplication and division.

A

Conditional Expressions

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

Type of operators uses two symbol characters are used as the equality operator in C# for comparing operands.

A

Equality Operators

==
!=

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

Type of operators uses test variables to see if one is greater or less than another variable or value.

A

Relational Operators
>
<
>=
<=

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

Type of operators uses two ampersands && and two pipes || to represent AND and OR, respectively. These two operators are called the

A

Logical Operators
&
&&
|
||
!

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

what are the if selection statement, classification:

A

one-way
two-way
nested

17
Q

is used when an expression needs to be tested. When the result of the expression is true, additional processing is performed.

A

one-way selection statement

18
Q

either the true statement(s) is (are) executed or the false statement(s), but not both.

A

two-way if statement

19
Q

When you place an if within an if

A

Nested if…else Statement

20
Q

● is considered a multiple-selection structure. It also goes by the name case statement.
● statement allows you to perform a large number of alternatives based on the value of a single variable. This variable or expression must evaluate to an integral or string value.
● It cannot be used with a double, decimal, or float. But it is appropriate for short, int, long, char, and string data types.

A

Switch Selection Statements

21
Q

With the switch statement, the expression is sometimes called, Its value determines, or selects, which of the cases will be executed.

22
Q

value that matches the expression results in that case’s statements being executed.

23
Q

is optional, but usually it is a good idea to include one. Are only executed when there is no match of any of the case values.

24
Q

is a data structure that may contain any number of variables. In the C# language, the variables must be of the same type.

25
also called the subscript of the array, references the location of the variable relative to the first element in the array.
index
26
Elements in an array are sometimes referred to as
indexed or subscripted