section c dastan predictions Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

State the name of an identifier for a public method in the Dastan class

A

PlayGame

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

Explain why this method is public and not private

A

It allows it to be accessed from outside the class by the main functions, otherwise if it was a private method this would not be possible

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

How many points do you lose when you choose a move from position 1, 2 and 3 in the queue?

A

1,4,7

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

Suppose you wanted to display the grid with 8 by 8 cells. What would you modify in the program?

A

Change this line:
ThisGame = Dastan(6, 6, 4) to
ThisGame = Dastan(8, 8, 4)

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

State the name of an identifier for a class that inherits from another class

A

Kotla

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

State the name of an identifier for a private method that has three parameters (including the object parameter).

A

CreateMoveOption

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

State the name of an identifier that is a Boolean variable

A

GameOver

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

What is the random module used for in the pre-release?

A

Randomly selects the move offer option

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

State the name of a built-in function

A

print, int, float, input, str

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

What effect does the super routine in class Kotla have?

A

Can use method class in the parent class, even if overridden

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

Give an example from the code of object instantiation?

A

Thisgame= Dastan(6,6,4)

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