1) Write a simple pre-test loop in a language familiar to you. Identify the language.
2) What is the difference between the “scope” and the “lifetime” of a variable?
3) What are two (distinct) advantages in C++ of importing a String library rather than coding string variables from scratch? 4) What happens when you “increment” an enumerated data type?
5) Since the sub-range data type is an artificially restricted subset of a regular data type (e.g., integers), what is the advantage of including them in a programming language?
6) What would be the advantage of creating a “jagged” multi-dimensional array?
7) Why are linked lists used to simulate dynamic arrays in many languages? 8) What is referential transparency?
9) How can potential ambiguities be resolved when using two-way selector statements?
10) Give an example of a program that could use a FOR loop with a step size greater than 1.
11) If you were creating a programming language and had to decide between including only a FOR loop or only a WHILE loop, which would you choose? Explain your selection.
12) Under what circumstances would the inclusion of an infinite loop NOT be a coding mistake?
13) Explain how coercion can lead to problems when overloading subprograms.
14) What are “polymorphic” subprograms?
15) What is “shallow” binding? Section 2: Less-short Answers (40 points)
1) Give an example of a Record declaration in Ada syntax (see your notes) that might contain data for students of a university, including fields that you would consider to be relevant. 2) Make a case for either: a) including user-accessible pointers in Java, or b) excluding pointers from the C language family. 3) Would your ideal programming language allow the GOTO statement? Why or why not? 4) What is an advantage of using parameter-passing between subprograms, rather than merely allowing them all to interact with globally-scoped variables? 5) If you were using a programming language that only allowed functions to return ONE value, but you wanted to modify the value of two variables with a single function call, how would you do it?
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of