Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Assuming the Java language, determine as precise binding times as you can for

ID: 3664412 • Letter: 1

Question

1. Assuming the Java language, determine as precise binding times as you can for the following attributes: (1 pt. each)

(a) The maximum number of significant digits in a real number

(b) The meaning of char

(c) The size of an array variable

(d) The size of an array parameter

(e) The location of a local variable

(f) The value of a manifest constant

(g) The value of an elaboration-time constant

(h) The location of a static method in memory

(i) The location of an instance method in memory

(j) The location of an object instance in memory

(k) The meaning of operator +

Explanation / Answer

1
(a) The maximum number of significant digits in a real number will be an
integer value which is bound to a variable statically at compile time.

(b) The meaning of char is also declared in language definition
statically . The size of char is two bytes which boud statically.

(c) The size of array variables is bound statically at compile time.
For example, int arr[10], float arr[10] is predetermined.

(d) The size of array parameter is bound dynamically at run
time during the program execution.
For example, int arr[]={1,2,3,4}
The size is determined at run time.

(e)
The location of variable bound at run time dynamically.
During the execution of program, opeating system memory
management determines the location of variable in the free(heap)
memory.

(f)The manifest constant is a constant which determines before
program execution.
it is bound statically. For example, const int size=10;

(g)Elboration time is boud to dynamic time since the size of
the array is determined at run time .

(h) The location of static function is bound statically when the compilation
time when program compilation. The scope of the local variables
are also bound statistcally at compile time.

(i) The location of instance function is bound statically when the compilation
time when program compilation. The scope of the local variables
are also bound statistcally at compile time.

(j) The location of function is bound dynamically at run time on heap
memory.

(k) The meaning of operator "+" is bound statically as addition
at any context in the program excution.
The user method of definition may vary based on the requirement
of defintion of user defined data type. The meaning of variable
cannot be changed.