cp_hw.docx

Q1

When one class encompasses the properties of another, that technique is called _____.

A. mutual exclusion

B. monitor

C. inheritance

D. parameter

Match the definition on the left with the correct term on the right.

A program that translates other programs into machine language

a programming statement that describes data that is to be manipulated by the program

a programming statement that describes the actions to be perfomed

a block of elements of the same type

enhances the readability of a program by explaining what is happening or why

an explicit appearance of a value in a program

a descriptive name assigned to a specific, nonchangeable value

an organized design methodology combined with the appropriate use of the language's control statements

a variable that is declared within a procedure and can only be used in that procedure

a variable that can be used throughout an entire program

a program unit that is similar to a procedure except that a value is transferred back to the calling program unit

a template from which objects are constructed

active program unit containing both data and procedures

a variable within an object

a single entity that may consist of multiple characters but is treated as one unit

the part of the translator that encodes each token with its classification and hands it to the parser

A.

structured programming

B.

token

C.

comment

D.

global

E.

lexical analyzer

F.

object

G.

local

H.

imperative

I.

class

J.

literal

K.

declarative

L.

instance

M.

constant

N.

array

O.

compiler

P.

function

Match the description of the programming paradigm on the left to the correct type on the right.

                                                  

small predefined program units are connected so that each unit's outputs are used as another unit's inputs

                                                  

collection of units that can perform actions or request actions from other units

                                                  

sequence of commands that manipulate data to produce desired results

                                                  

pre-established general-purpose problem-solving algorithm to solve problems

A.

imperative/procedural

B.

object-oriented

C.

functional

D.

declarative

Which of the following is NOT a data type that we discussed in class?

A

integer

B

character

C

real

D

cin

Match the description of the prevalent language types on the left with the correct generation on the right.

                                                  

very high-level languages

                                                  

machine language

                                                  

high-level languages such as C++, Java, PHP

                                                  

assembly language

A.

1st GL

B.

3rd GL

C.

4th GL

D.

2nd GL

-