Game Development Reference
In-Depth Information
Appendix A
Exercises and Challenges
A.1 Exercises and Challenges for Part I
Exercises
1. Programming paradigms
Indicate whether the following statements are true or not (and explain why):
(a) All imperative languages are object-oriented.
(b) There are object-oriented languages that are not procedural.
(c) Procedural languages have to be compiled.
(d) Declarative languages cannot run on the same processor are imperative lan-
guages, since that processor can execute an assignment instruction, which
doesn't exist in declarative languages.
2. The compiler as a program
A compiler itself is also a program.
(a) Can the compiler itself be written in a higher programming language?
(b) And if so, can that language be the same as the language that the compiler
compiles?
(c) If so, can the compiler compile itself?
3. Names
In mathematics and physics, it is quite common to use fixed variable and con-
stant names. Which ones? Is this useful?
4. Classes and types
Name five standard classes, and for three of those, also name a method that
belongs to it. Also name three types that are not classes.
5. Comments
What are the two ways to write comments in a C# program?
 
Search WWH ::




Custom Search