UNIT 5 Flashcards

1
Q

C++ is considered an efficient language for programming games because it is faster to write than other scripting languages. (T/F)

A

False, C++ is not a scripting language

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

The main difference between C and C++ is that C++ is a strongly-typed language with object-oriented features.

A

False, C++ can be seen as a class-based C

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

One of the weaknesses of C++ is that it requires the programmer to deal with too many low-level programming techniques. (T/F)

A

True

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

Dictionaries are data structures that are more efficient at mapping one set of keys to a set of data than linked lists. (T/F)

A

True

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

Unlike C or C++, Java does not have built-in dynamic data structures with pointers. (T/F)

A

True

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

Since Java programs run on virtual machines, they run faster than equivalent C++ programs.

A

False

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

If a program can be written in a scripting language, it will generally be much shorter than the same program written in C++

A

True

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

One disadvantage of scripting languages is the lack of automatic memory management. (T/F)

A

True

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

If your intention is to use scripting languages on a limited-memory console, then Lua is preferred over Python or Perl. (T/F)

A

True

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

You should not use Lua if you do not want your program to pause during execution. (T/F)

A

True

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

For rapid iteration in program development, scripting languages are preferred over C++ or Java. (T/F)

A

True

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

While dynamic data structures provide versatility and save memory, arrays are simpler to program, and do not result in fragmented memory. (T/F)

A

True

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

While dynamic data structures provide versatility and save memory, they are difficult to program and debug. (T/F)

A

True

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

Bit packing is a technique used to save memory when floating-point numbers are used. (T/F)

A

False, Integers are also one of the reasons. It allows you to use less space when you don’t have the need for so many bits (such as an integer requiring 32 bits) to represent the range of values in which you are interested.

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

Classes are abstract specifications of user-defined type that only allow one instance for each class. (T/F)

A

False, they allow as many instances as necessary

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

Consider a scenario where there are three classes that are extensions of each other: Enemy, Boss, and Super-Duper Boss. The Boss is also an Enemy, and the Super-Duper Boss is a Boss. In this scenario, the Boss class is the parent of the Enemy class. (T/F)

A

False,it is a child

17
Q

One of the limitations of class inheritance is the unclear flow control between related entities. (T/F)

A

True