Programming Langauge Help
Programming Languages CMP 339/692 Exam #3 – Chapters 8, 9 and 10 Extra Credit Name:__________________________
12/11/2013 Page 1 of 2
Multiple Choice (worth 2 points each)
Short Answer (worth 10 points each)
1. What are the arguments both for and against the exclusive use of Boolean expressions in the
control statements in Java (as opposed to also allowing arithmetic expressions, as in C++)?
2. What are arguments for and against a user program building additional definitions for
existing operators, as can be done in Python and C++? Do you think such user-defined
operator overloading is good or bad? Support your answer.
Programming Languages CMP 339/692 Exam #3 – Chapters 8, 9 and 10 Extra Credit
12/11/2013 Page 2 of 2
3. Although local variables in Java methods are dynamically allocated at the beginning of each
activation, under what circumstances could the value of a local variable in a particular
activation retain the value of the previous activation?
4. If a compiler uses the static chain approach to implementing blocks, which of the entries in
the activation records for subprograms are needed in the activation records for blocks?