CSC 4101 with Supratik - Spring 2020

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

CHAPTER TWO REVIEW QUESTIONS

CHAPTER TWO REVIEW QUESTIONS

safety for efficiency (but largely depends on the audience of the language)

Describe some design trade-offs between efficiency and safety in some language you know.

Advantages: developed as a portable multi programming operating system Disadvantages: lack of proper GUI for Unix, lack of uniform features for different languages

Describe the advantages and disadvantages of some programming envi- ronment you have used.

The capacity of abstract thought is influenced greatly by the influenced greatly by language skills because language is used to develop thoughts in a structured way.

Do you believe our capacity for abstract thought is influenced by our language skills? Support your opinion.

cost of training programmers in that language, cost of writing codes or development, cost of compilation and execution, implementation systems, reliability and modification of code that already exists

Explain the different aspects of the cost of a programming language.

web programming

For what application area is JavaScript most widely used?

IBM System/360 line of computers

For what new line of computers was PL/I designed?

Smalltalk

From what language does Objective-C borrow its syntax for method calls?

Knowledge of programming language characteristics can be used to develop more elegant and efficient constructs for applications for various disciplines. (COBOL was a popular language in the 1960's, but ALGOL 60 was more powerful. The latter couldn't beat COBOL, even though it was technically a "better" language.)

How can knowledge of programming language characteristics benefit the whole computing community?

If a programmer overloads an operator '+' to find the difference between corresponding elements of two different arrays, it would lead confusion for the reader of the program, thus decreasing readability.

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

Increases readability and writability

How do type declaration statements for simple variables affect the readabil- ity of a language, considering that some languages do not require them?

Java is a strongly typed language where as JavaScript and PHP are dynamically typed.

How does the typing system of PHP and JavaScript differ from that of Java?

(1) Cost of training programmers in that particular language (2) Cost of writing codes or development of that language (3) Cost of implementation systems, reliability, and the cost of maintenance of already existing code

How is the cost of compilers for a given language related to the design of that language?

numeric codes were used to specify instructions, usage of absolute addressing

How were the pseudocodes of the early 1950s implemented?

C

In what language is most of UNIX written?

ALGOL 60

In what version of ALGOL did block structure appear?

(1) size (Lisp is large, Scheme is small) (2) Scheme uses static scoping while Lisp uses static and dynamic scoping (3) Lisp has packages for modularizing collections of functions to provide access control. Scheme does not.

In what way are Scheme and Common Lisp opposites of each other?

1959

In what year did the COBOL design process begin?

Developed in 1945, published in 1972

In what year was Plankalkül designed? In what year was that design published?

1954

In what year was the Fortran design project begun?

orthogonally, reliability, type-checking and exception handling

In your opinion, what major features would a perfect programming language include?

for: increases the readability of the code against: reduces writability of programs

Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?

Single line comments are better suited where one line or less of info is required. Multi-line comments are preferred where paragraphs are used to describe algorithms as well as info about all their parts.

Many contemporary languages allow two kinds of comments: one in which delimiters are used on both ends (multiple-line comments), and one in which a delimiter marks only the beginning of the comment (one- line comments). Discuss the advantages and disadvantages of each of these with respect to our criteria.

pros: increases readability cons: requires extra effort from programmer to always be alert about naming conventions. one or more problems with the design may cause errors

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

compiler

Was the first high-level programming language you learned imple- mented with a pure interpreter, a hybrid implementation system, or a compiler? (You may have to research this.)

packages

What Ada construct provides support for abstract data types?

aliasing, ternary operator's use as an Ivalue, accessing the 5th element of an array with 4[ptr]

What are some features of specific programming languages you know whose rationales are a mystery to you?

platform independence, easier to debug interpreted languages, interpreted language programs are usually comparatively smaller in size as compared to compile languages, automatic memory management

What are the advantages in implementing a language with a pure interpreter?

execution time and concepts of computer architecture

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

tasks

What are the concurrent program units of Ada called?

1.) Data Abstraction 2.) Inheritance 3.) Polymorphism

What are the three fundamental features of an object-oriented program- ming language?

Compiler implementation, JIT, combination of compiled and interpreted implementation.

What are the three general methods of implementing a programming language?

facts and rules

What are the two kinds of statements that populate a Prolog database?

lack of complete type checking and management of pointers

What are two characteristics of C that make it less safe than Pascal?

There isn't much of an argument to make. One particular language cannot incorporate all the features needed for each and every domain in which it is applied. It is as such that programmers often just learn a subset of a language that may be used of a particular language for a project.

What arguments can you make for the idea of a single language for all programming domains?

jagged arrays

What array structure is included in C# but not in C, C++, or Java?

The format of syntax

What characteristic of Java is most evident in JavaScript?

Shortcuts for assignment statements/comparison operators

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

logical loop control, IF/ELSE/END IF

What control flow statements were added to Fortran IV to get Fortran 77?

hierarchical data structure

What data structure that appeared in COBOL originated with Plankalkül?

orthogonality

What design criterion was used extensively in ALGOL 68?

scheme language

What dialect of Lisp is used for introductory programming courses at some universities?

high level languages, support OOP, future visions of the languages support the programs already written, both not good for beginners, used frequently for applications, not user friendly

What do the Ada and COBOL languages have in common?

A linker is used during the compilation process for linking. Object files produced by the compiler and the library files are combined by the linker to make a single, executable file.

What does a linker do?

A program is reliable if under all conditions, the program performs according to its specifications.

What does it mean for a program to be reliable?

concept of class, instance of class, and data abstraction

What features of SIMULA 67 are now important parts of some object-oriented languages?

Indexing and floating point instructions. Till that time, both were unavailable. With their introduction, the cost of interpretation was lowered. Also led to development of languages like FORTRAN.

What hardware capability that first appeared in the IBM 704 computer strongly affected the evolution of programming languages? Explain why.

Computer Architecture

What have been the strongest influences on programming language design over the past 60 years?

user defined data structures

What innovation of data structuring was introduced in ALGOL 68 but is often credited to Pascal?

A computer language that does not require writing of programming logic in a traditional sequential way. Also known as a decorative language.

What is a nonprocedural language?

Having two different names for one memory location

What is aliasing?

Cost of execution and reliability

What is an example of two language design criteria that are in direct conflict with each other?

The ability of a program to intercept unusual conditions at runtime, take corrective measures, and then continue without crashing.

What is exception handling?

Arrays can contain data of any type but not void or functions.

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

1.) Increased compilation time 2.) Readability/Understandability is diminished

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

imperative languages

What is the name of the category of programming languages whose structure is dictated by the von Neumann computer architecture?

embedded systems

What is the primary application area for which Ada was designed?

Initially licensed and used in NeXT software by Steve Jobs, then used later to code Mac OS X for Apple.

What is the primary application for Objective-C?

ALGOL-W

What language introduced the case statement?

Assembly language of VAX series microcomputers.

What language used orthogonality as a primary design criterion?

BNS (Backus-Naur form)

What language was designed to describe the syntax of ALGOL 60?

Smalltalk

What language was the first to support the three fundamental features of object-oriented programming?

lack of input and output statements

What missing language element of ALGOL 60 damaged its chances for widespread use?

Assigning operators, treatment of pointers, for and switch statements

What operators in C were modeled on similar operators in ALGOL 68?

The US Department of Defense

What organization was most responsible for the early success of COBOL (in terms of extent of use)?

objects

What populates the Smalltalk world?

constructs

What primitive control statement is used to build more complicated control statements in languages that lack them?

Lisp was predominantly used. After 1970, use of Prolog was also used, and now C is also used.

What programming language has dominated artificial intelligence over the past 60 years?

COBOL

What programming language has dominated business applications over the past 60 years?

Fortran, and it is even still used today.

What programming language has dominated scientific computing over the past 60 years?

Serves at the database during compilation processes

What role does the symbol table play in a compiler?

abstract data types, inheritance, polymorphism

What three concepts are the basis for object-oriented programming?

integers and floating points

What two common data structures were included in Plankalkül?

sh and awk

What two languages was the original version of Perl meant to replace?

ACM and GAMM

What two professional organizations together designed ALGOL 60?

1.) Lack of type checking can lead to unreliability of code 2.) Inadequacy of control statements requiring extensive usage of goto statements

What two programming language deficiencies were discovered as a result of the research in software development in the 1970s?

liberal arts students

What user group was the target of the first version of Basic?

embedded consumer electronic devices

What was the first application for Java?

independent compilation of subroutines

What was the most significant feature added to Fortran I to get Fortran II?

scientific applications

What was the primary application area of computers at the time Fortran was designed?

IBM 704's instructions

What was the source of all of the control flow statements of Fortran I?

Developed by John McCarthy in 1958.

Where was Lisp developed? By whom?

A compiler

Which produces faster program execution, a compiler or a pure interpreter?

Fortran 90

Which version of Fortran was the first to have any sort of dynamic variables?

Fortran 77

Which version of Fortran was the first to have character string handling?

So the new language could be used for every application for which C was also used

Why does C++ include the features of C that are known to be unsafe?

To increase the capacity to express the ideas, better understanding of the significance of implementation, and to increase the ability to design a new language.

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?

Readability affects writability in both development and maintenance phases of the software cycle.

Why is readability important to writability?

The von Neumann bottleneck has led to increases in processor speed.

Why is the von Neumann bottleneck important?

Type-checking is important to maintain the reliability of the code.

Why is type checking the parameters of a subprogram important?

It was an easily understood language for beginners that were non-science oriented. A wider variety of people could use it and be exposed to programming.

Why was Basic an important language in the early 1980s?

Because floating point hardware was unavailable computers, and software that had it had too much processor time consumption

Why was the slowness of interpretation of programs acceptable in the early 1950s?

natural language processing

Why were linguists interested in artificial intelligence in the late 1950s?

REVIEW QUESTIONS - CHAPTER ONE

REVIEW QUESTIONS - CHAPTER ONE

Programming community for that language(provides support for any problem one may encounter during the use of that language), range of application of that language (a language which can be used for different domains usually attracts more programmers to use it)

Name and explain another criterion by which languages can be judged (in addition to those discussed in this chapter).

FLOW-MATIC

On what programming language was COBOL based?

FORTRAN and COBOL

PL/I was designed to replace what two languages?

PROBLEM SOLVING - CHAPTER ONE

PROBLEM SOLVING - CHAPTER ONE

Java is less prone to syntactic errors. If we were to use Pascal's method, the use of full stop would make it difficult for compilers to parse trees of code.

Some programming languages—for example, Pascal—have used the semicolon to separate statements, while Java uses it to terminate state- ments. Which of these, in your opinion, is most natural and least likely to result in syntax errors? Support your answer.

computer hardware of that age didn't support floating point operations, didn't allow indexing to search arrays easily

Speedcoding was invented to overcome two significant shortcomings of the computer hardware of the early 1950s. What were they?


संबंधित स्टडी सेट्स

Physics Unit E (only the ones i struggle with)

View Set

Chapter 11- Discrimination- Sociology

View Set

Chapter 1: An Introduction to Geology

View Set