Sunday, 28 September 2014

Chapter 1 Programming Language Concepts Robert W.Sebesta



Nama : Billy
NIM   : 1801374785

Kali ini saya akan menjawab assigment #1 dari Chapter 1 Program Learning Language Concepts R. Sebesta 



Review Question

6. In what language  most of UNIX written ?

A:The UNIX operating system was first written in assembly language, but by 1973 had been almost entirely coded in C language

7.What is the disadvantage of having too many features in a language ?

A:disadvantage having too many languages will detrimental  programming practice and make confused user to solving problem because not all of features will be used by the user

8. How can user-defined operator overloading harm the readability of a program ?

A:in case that user doesn’t realize the difference in operands and a possible confusion between functions of an operator


9. What is one example of a lack of orthogonality in the design of C ?


A:C is can be return but in array can't be return



10. What language used orthogonality as a primary design criterion ? 


 A: it is ALGOL 68



Problem Set 


6. What common programming language statement , in your opinion, is most detrimental to readability? 


A:the most detrimental is poorly-written and undocumented code will be extremely hard to follow and hard too new programmer to understand undocumented code


7.Java uses a semicolon to mark the end of all statements. What are the  advantages for and against this design ?


A:The purpose of using a semicolon to mark the end of all statements in Java is to make the statements unambiguous. Almost all of programming language like C/C++ also use a semicolon to mark the end of all statements. With semicolon, the program will be more clear . The disadvantage probably you forget to put the semi colon



8. Many languages distinguish between uppercase and lowercase letters in user-defined names. What are the pros and cons of this design decision ? 



A:(Pros) the distinguished between uppercase and lowercase can effect for the
 quantity of the variable in the programming language. For example, ‘A’ and ‘a’
 are the different variable and it has 2 variables. 
(Cons) the distinguished between uppercase and lowercase can affect the programmer or even another user. Because it’s make a confusion between them.
9.Explain the different aspects the cost of a programming language!
A:There are 2 aspects of the cost of a programming language. Such as, first, the cost of testing/running the program. Second, the cost of maintaining and documenting the program.

10.What are the arguments for writing efficient programs even though hardware is relatively inexpensive ? 



A:One of the main arguments is that regardless of the cost of hardware, it is not free. Why write a program that executes slower than is necessary. Furthermore, the difference between a well-written efficient program and one that is poorly written can be a factor of two or three. In many other fields of endeavor, the difference between a good job and a poor job may be 10 or 20 percent. In programming, the difference is much greater. 



Bonus Question 


What is the difference between imperative language and procedural language ?


A:imperative language is focused on describing how a program operates but Procedural programming is imperative programming in which the program is built from one or more procedures (also known assubroutines or functions)