Chapter 2 Problems
CHAPTER 2 REVIEW QUESTIONS
1. In what year was Plankalkül designed? In what year was that design
published?
- It was designed in 1945 but published in 1972.
2. Mention an interesting feature of Zuse’s programs
- It did not allow any else clause
3. What does Plankalkul mean?
- program calculus
4. Speedcoding was invented to overcome two significant shortcomings of
the computer hardware of the early 1950s. What were they?
- computers were slow, unreliable, and expensive. They were hard to program also.
5. 5. What is the number of bits in a single word of the UNIVAC I’s memory? How are the bits grouped?
_ The number of bits is 72 and they are grouped as 12 six bytes.
. Who developed the Speed coding system for the IBM 701?
- John Backus
8. Who developed short code? Why is short code called automatic programming?
- John mauchly invented short code and it is called automatic programming because it clearly simplified the programming process, at the expense of execution time.
9. Under what environmental consideration was Fortran developed?Which is the first version of Fortran?
-Under UBM was Fortran created and the first version was 0.
10. What was the most significant feature added to Fortran I to get Fortran II?
-The most significant feature was the become independent compilation of subroutines.
11. Which control flow statements were added to Fortran IV to get Fortran 77?
- Character string handling, logical loop control statements, and an IF with an optional ELSE clause.
13. Which version of Fortran was the first to have character string handling?
-Fortran 77
14. Why were linguists interested in AI in the late 1950s?
-Linguists were concerned with natural language processing.
21. What language was used to describe the syntax of algol 60?
- BNF
23. In what year did the COBOL design process begin?
-1959
27. Why was BASIC an important language in the early 1980s?
- It was the first widely used language that was used through terminals connected to a remote computer.
33. What language introduced the case statement?
- ALGOL W
42. What three concepts are the basis for object-oriented programming?
-Classes, Objects, and Methods.
PROBLEM SET
3. Write a short history of the Fortran 0,I,II, and IV Systems.
-Fortran 0 was modified during the implementation period, which began in January 1955 and continued until the release of the compiler in April 1957.
The implemented language, which we call Fortran I, is described in the first Fortran Programmer’s Reference Manual, published in October 1956 (IBM, 1956). Fortran I included input/output formatting, variable names of up to six characters
(it had been just two in Fortran 0), user-defined subroutines, although they could not be separately compiled, the If selection statement, and the Do loop statement.
IBM's FORTRAN II appeared in 1958. The main enhancement was to support procedural programming by allowing user-written subroutines and functions which returned values, with parameters passed by reference. The COMMON statement provided a way for subroutines to access common (or global) variables. Six new statements were introduced:
Starting in 1961, as a result of customer demands, IBM began development of a FORTRAN IV that removed the machine-dependent features of FORTRAN II (such as READ INPUT TAPE), while adding new features such as a LOGICAL data type, logical Boolean expressions and the logical IF statement as an alternative to the arithmetic IF statement. FORTRAN IV was eventually released in 1962, first for the IBM 7030 ("Stretch") computer, followed by versions for the IBM 7090 and IBM 7094.
4. As a research project, compare the features of C with those of BASIC.
-Visual Basic (also known as VB) is an event driven programming language. This is the third generation of such language and is also an integrated development environment (or IDE). It comes from Microsoft and is used specifically for its programming model –COM. It is lauded as a simple language to learn because of its BASIC heritage and its graphical development features. VB enables rapid application development (or RAD) of GUI applications; access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects; and the creation of ActiveX controls and objects.
C is a programming language for general purpose computers. It was specifically designed for use on the Unix operating system. It is used for implementing system software; however, it has also been known to be used for developing portable application software. As one of the most popular programming languages, most operating systems have an architecture in which a C compiler exists.
5. Which of the three original goals of the Fortran design committee, in your opinion, was most difficult to archieve at that time?
-Because of the high cost of computers compared to the cost of programmers, speed of the generated object code was the most difficult
6. Make an educated guess as to the most common syntax error in C programs
-People always forgot to put a semi colon or something small like a period or comma
10. Outline the major developments in ALGOL 60.
- ALGOL 60 as officially defined had no I/O facilities; implementations defined their own in ways that were rarely compatible with each other. In contrast, ALGOL 68 offered an extensive library of transput (ALGOL 68 parlance for Input/Output) facilities.
ALGOL 60 allowed for two evaluation strategies for parameter passing: the common call-by-value, and call-by-name. Call-by-name had certain limitations in contrast to call-by-reference, making it an undesirable feature in imperative language design. For example, it is impossible in ALGOL 60 to develop a procedure that will swap the values of two parameters if the actual parameters that are passed in are an integer variable and an array that is indexed by that same integer variable. However, call-by-name is still beloved of ALGOL implementors for the interesting "thunks" that are used to implement it. Donald Knuth devised the "man or boy test" to separate compilers that correctly implemented "recursion and non-local references." This test contains an example of call-by-name.
13. What is the primary reason why C became more widely used than Fortran?
- People Use the UNIX operating system that was based on C.
15. Are there any nonprocedural programming languages other than Prolog?
- Yes there are.
25. Give a brief general description of the Java servlet.
-A servlet is a Java programming language class used to extend the capabilities of a server. Although servlets can respond to any types of requests, they are commonly used to extend the applications hosted by web servers, so they can be thought of as Java Applets that run on servers instead of in web browsers. These kinds of servlets are the Java counterpart to non-Java dynamic Web content technologies such as PHP and ASP.NET.