Minggu, 10 Maret 2013

Chap 1 - Review Question and Problem Set - Concepts of Programming Languages, Sebesta


Review Question


1. Why is it useful for a programmer to have some background in language design, even though he or she may never actually design a programming language?
Answer:
It is useful to have some language design background because it can increase the capability to express ideas, it will increase ability to learn new languages and help the person to choose the appropriate language

2. How can knowledge of programming language characteristics benefit the whole computing community?
Answer:
By having knowledge about programming language characteristic, the computing community can make the right decision to choose the appropriate programming language for a more efficient work to solve problems.


4. What programming language has dominated business applications over the past 50 years?
Answer:
The programming language that dominated business application over the past 50 years was COBOL


6. In what language is most of UNIX written?
Answer:
UNIX was mostly written in C language

7. What is the disadvantage of having too many features in a language?
Answer: it will decrease the simplicity and it can also decrease the readability

9. What is one example of a lack of orthogonality in the design of C?
Answer: 
A programming language supports the use of pointer variable so it should be possible to define a pointer to point any specific type defined in the language. In case, if the pointers are not allowed to point array, many potentially useful user-defined data structures cannot be defined

12. What construct of a programming language provides process abstraction?
Answer:
The degree of abstraction allowed by the programming language and the naturalness of its expression construct the programming language provide process abstraction

13. What does it mean for a program to be reliable?
Answer:
A program is said to be reliable if it performs to its specifications under all conditions.

14. Why is type checking the parameters of a subprogram important?
Answer:
It is important in order to make sure that there is no type error which can cause countless program error


15. What is aliasing?
Answer:
 Aliasing is having two or more distinct names that can be used to access the same memory cell

17. Why is readability important to writability?
Answer:
Because readability affects reliability in both the writing and maintenance phases of the life cycle.

20. What is the name of the category of programming languages whose structure is dictated by the von Neumann computer architecture?
Answer:
the name of the category of programming language whose structure is dictated by the von Neumann computer architecture is imperative language

21. What two programming language deficiencies were discovered as a result of the research in software development in the 1970s?
Answer:
incomplete of type checking and inadequacy of control statement

Problem Set


2. Who is said to be the first programmer in human history? Use the Internet for help.
Answer:
According to the Wikipedia.com the first programmer was Ada Lovelace


3. What are the disadvantages of multiple programming languages?
Answer:
The disadvantages are, first, this condition makes many standard requirements to decide an appropriate programming language, second it is difficult to understand all of the programming language variety, and third there must be a conversion between one programming language and other in order to combine a different subprogram written in a different language into one simple program.


4.In what way do the languages for scientific applications differ from the languages for business applications? Support your view.  
Answer:
 languages for scientific application allows the user to make a complicated calculation with some large number of  floating point in the other hand languages for business application are design for the user to user characterized facility to elaborate reports, precise ways of describing and storing decimal numbers and character data.

6. Which characteristic of programming language do you think are the most important and why?
Answer:
In my opinion the readability is the most important characteristic in programming language. It is because readability reference to the overall simplicity, orthogonality, data types and also the design of the syntax. So the more readable programming language makes easier way to develop a program.


9. Explain how orthogonality in a programming language is closely related to simplicity
Answer: If a language has a large number of different constructs, some programmers might not be familiar with all of them. Therefore, a smaller number of primitive constructs and a consistent set of rules for combining them (that is, orthogonality) is much better than simply having a large number of primitives. So orthogonality in programming language is closely related to its simplicity.

10. Make a comparative study of the cost of software and hardware
Answer:
Nowadays generally hardware computers cost cheaper than software of computer because most of hardware computer industry uses advance technology such as robotics and advance material such as silicon for the semiconductor to increase the efficiency and reduce the cost of the making, in the other hand software industry nowadays create better and better software and it is created by human creativity, logic and all about the human resource so that makes software cost more expensive than hardware. But if we look at the pass, the hardware is more expansive than software, because to create computers hardware requires high skill employers beside using advance robot technology, in the opposite the cost of software is cheaper than hardware because in the pass computer are not able to run such a big and complex software so the software in the pass was not as complex as nowadays’ software.

13. Was the first high level programming language you learned implemented with a pure interpreter, a hybrid implementation system, or a compiler?
Answer:
yes, C was my first programming language that I studied and C is implemented with compiler implementation method.

15. Name some language which use preprocessor directive and some which don’t. What are the advantage and disadvantage of preprocessor directives?
Answer:
Languages that use prepocessor : Java, C, C++, PL/I
languages that dont use prepocessor: Ada, Modula, Clu
Advantage of using preprocessor directive
-Helps the programmer to define a symbol or value that can reduce the development time
-To specify the use of a library that contains of function(s)
Disadvantage of using preprocessor directive
-increase the whole processing time to execute the program

By Moses Kurniawan
NIM : 1601235003
Class: 02PCT
Special thanks to:  Mr. Tri Djoko Wahjono, Ir., M.Sc.

Tidak ada komentar:

Posting Komentar