[SOLVED] COSC450/550 Lab 2

10.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Program 1:
Write a program that uses both static and a kind of dynamic scoping, and clearly show the
difference in effect of the two. Explain clearly the differences between the static and the
dynamic scoping.
Program 2:
Write test programs in C++ and Java to determine the scope of a variable declared in a for
statement. Specifically, the code must determine whether such a variable is visible after
the body of the for statement.
Instructions:
1. Submit the source file for both programs on blackboard.
2. Submit a screen shot of the result in a word document.
3. Using comments to show your name, the purpose of the program, and the date in the
source code.
4. Students can work as pair; individual lab has to be submitted by each student.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.