Answer the following questions true (T) or false (F)

1. Procedural abstraction involves information hiding in that only the 'contract' between the programmer using the function (the client) and author of a function is known to either.

2. A sequence of calls to the library function rand() generates mathematically correct random number sequences.

1. True
Explanation: Under procedural abstraction, the author (or programmer) of a given function should know about how the application programmer (or the client) will use the function is IN the ‘contract.’ The contract is what the function is to do, and the conditions set on the parameters to guarantee that the function can do IT. The author should not need not know how the function is to be used by the client programmer. The client programmer should know only only needs to know what the function does, the requirements on the parameters, but not how the function carries out the task. This way each can do his job independently of the other.
2. False
Explanation: The sequence is called pseudorandom because it appears to be random. The results are good enough to obtain usable answers with computer simulation.

Computer Science & Information Technology

You might also like to view...

The appearance of a document is referred to as its ________

A) presentation B) version C) format D) style

Computer Science & Information Technology

Match the following Web surfing problems to their explanations:

I. "Page Not Found" message II. wrong site reached III. part of page not working IV. slow page download V. Web page is garbled A. you have the wrong address B. there is a spelling mistake in the address or the server is down C. it is a peak, high traffic time of the day D. the Internet connection was interrupted E. the needed plug-in is not installed

Computer Science & Information Technology