2013-06-28

Note



Multi entry subprogram : Co routine

Return type : is not a parameter profile

Advantages of using keyword parameter : can appear in any order

Disadvantages of using keyword parameter : user have to know the name of the formal parameter

Value of default formal parameter in C++ is located at : the end

Most imperative have function and procedure. Language that does not have procedure : Pascal

Language below that have stack dynamic local variable : Java

Recursive subprogram is first designed in : Algol

Pass by copy is the other name for : pass by value-result

Implementation of I/O parameter model is : Pass by name, pass by reference, pass by value-result

Aliases that happen in pass by reference can be eliminated using : pass by name

Characteristic of pass by name is : flexible but slow

Overloaded subprogram is also called : ad hoc polymorphism

If a subprogram have a unique protocol, then it is called : overloaded subprogram

Side effect problem could be avoided using : in-out mode parameter

The only language that can return any type value is : Ada

The first language that use co-routine is : Simula 67

One of the characteristic of co-routine is : multi-entry

Late binding happen at : pass by name

Variable dynamically allocated : is NOT characteristic of subprogram on FORTRAN 77

Subprogram linkage included : sub program call and return

Activation record on FORTRAN 77 only have one instance because : no recursion

Two main methods to access non-local variable in static scope is : static chain and display

The pair that is used to show actual reference of non-local variable on static scope is : chain offset, local offset

Disadvantage of using static chain to access non-local variable is : the cost to point to variable and hard to estimate the variable cost.

Display : collection of static link that is stored in stack array

To refer to local variable : Display is as fast as static chain

When referring non-local variable, static chain is fasten then display : if the static away level is the same

Compare with deep access, shallow access is : much faster and less costly

Characteristic of dynamic chain is : fast access, fast call

2 different method that is used for passing parameter in language that is similar to Algol is : pass by value, pass by reference

Method that is used to implement block are : parameter-less subprogram and local allocation above ARI

Example of process abstraction are : subprogram, concurrency, and exception handlers

The main feature of ADT are : encapsulation and information hiding

Parametrized ADT in C++ is called : Template Class

Concept of Encapsulation is first implemented by : Simula 67

Function in C++ that is used to give initial value to a new object is : constructor

Simulator : is not an operation that have to be made by ADT designer

Instance on ADT is called : object

Additional feature that differentiate Ada 95 with ada 83 are : protected object and asynchronous communication

Key concept on data abstraction : information hiding

Object modularity : is not the advantages of information hiding

Language which construction did not include information hiding is : SIMULA 67

Encapsulation in Ada is called : Package

C++’s class and Ada’s package are encapsulation

Generic or parametrized ADT in C++ is called : Template

Task : is implicitly started

Data task communication is done through : parameters, message passing and shared non local

Language that use dynamic binding between exception and handler is : PL/I

The first person to suggest the usage of static binding between exception and handler is : J.B. Goodenough

Exception in C++ is raised explicitly through : Throw [expression]

Language that didn’t provide build-in exception is  : c++

Handler on PL/I format :
ON condition [snap]
begin
end

Exception handling first developed in language : PL/I

Scope on C++ handle is specified by : Try construct

Language which design exception is considered weird because it doen’t have a name is : C++

Exception handler usually local on the code where the exception handling appear so it does not need 
parameter. This type didn’t happen in language : Ada, C++, and Java

Exception handling in C++ is NOT designed by : PL/I

Exception handling in C++ is different with Ada in : There exist built in exception and no named user defined exception

Language that force the user designed exception in form of class is : Java

The syntax throw new myException[ ] : is Java

All handler in C++ have the same name, Catch. This case is known as : overloaded name

Exception that is often ignored by user program is : throw able exception

Exception that is not concern with compiler is : unthrowable exception

Language that check array subscript error range are : Ada and Java

Exception handling in C++ is similar to Ada in : Static binding and spread onto function caller

The term monitor is first used by : C.A.J. Hoare

Concurrent Pascal is Wirth Pascal with extra feature except : guard

Instance on monitor is created using : Init statement

Features that is provided by monitor so cooperation synchronization between process happen is : semaphore queue

Two basic characteristic that is provided by the language with concurrency is : mutually exclusive access, competition among task

For distributed system, the best model for concurrency is : Message passing

Category of concurrency are : physical, logical, quasi concurrency

Concurrency can happen at these level : Instruction, unit, program

Co-routine = quasi concurrency

Binary semaphore is : access

Tidak ada komentar:

Posting Komentar