Function Headers Flashcards

1
Q

Function Integer calculateOutput ( )

Is this a proper function header?

A

Function Integer calculateOutput ( )

Yes, this is a valid function Header.

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

Function Boolean calcOutput (names)

Is this a proper function header?

A

Function Boolean calcOutput (names)

Yes, this is a valid function Header.

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

Function Real displayOutput (names, points)

Is this a proper function header?

A

Function Real displayOutput (names, points)

Yes, this is a valid function Header.

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

Function void displayOutput (names, points)

Is this a proper function header?

A

Function void displayOutput (names, points)
No, this is NOT a valid function Header.
Functions return a value. Void is not valid in a function header in pseudocode.

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

Function Real GetReal (String message)

Is this a proper function header?

A

Function Real GetReal (String message)
No, this is NOT a valid function Header.
The function name is not in camelCase.

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

Function Real getReal (String message)

Is this a proper function header?

A

Function Real getReal (String message)

Yes, this is a valid function Header.

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

Function Real Real getReal (String message)

Is this a proper function header?

A

Function Real Real getReal (String message)
No, this is NOT a valid function Header.
It has an extra return variable type.

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

Function Boolean shootAlienShip ( )

Is this a proper function header?

A

Function Boolean shootAlienShip ( )

Yes, this is a valid function Header.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
Function shootAlienShip ( )
Is this a proper function header?
A
Function shootAlienShip ( )
No, this is NOT a valid function Header.
It is missing a return variable type.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Function Real determineOutput ( )

Is this a proper function header?

A

Function Real determineOutput ( )

Yes, this is a valid function Header.

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

x = determineOutput ( )

Is this a proper function header?

A

x = determineOutput ( )
No, this is NOT a valid function Header.
It is a function calling statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
Function getInteger (String message)
Is this a proper function header?
A
Function getInteger (String message)
No, this is NOT a valid function Header.
It is missing the return variable type.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Function Integer getInteger (String message)

Is this a proper function header?

A

Function Integer getInteger (String message)

Yes, this is a valid function Header.

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

Function Real determineOutput (String)

Is this a proper function header?

A

Function Real determineOutput (String)
No, this is NOT a valid function Header.
The parameter list is missing the variable name.

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

Function Integer getReal (message)

Is this a proper function header?

A

Function Integer getReal (message)
No, this is NOT a valid function Header.
The parameter list is missing the variable type.

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