1 Choose a small or medium-sized imperative program that you have designed with global variables but without abstract types.
(a) Draw a diagram of your program’s architecture, along the lines.
(b) Redesign your program systematically using abstract types. Draw a diagram of your program’s new architecture, along the lines
2 Consider the following C code:
p = 1; m = n; a = b;
while(m > 0) {
if(m % 2 != 0) p = p * a;
m = m / 2;
a = a * a;
Write a more concise version of this code. Is the concise version more or less readable?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here