1. The ability to use methods without knowing the details of their contents is a feature of ____.

A) abstraction

B) encapsulation

C) inheritance

D) construction

 

2. A method is a program module that contains a series of statements that carry out a task.

A) True

B) False

 

3. ____ variables and constants are those that are known to an entire class.

A) Global

B) Local

C) Universal

D) Comprehensive

 

4. What is the screen output of the following code segment? Explain the reasoning behind your answer.

Test1 = 70 

Test2 = 80 

Test3 = 84

NumberOfTests = 3 

Average = (Test1 + Test2 + Test3) / NumberOfTests

IF Average >= 90 THEN

Output “Great job”

Output “Your average is: ”, Average

ELSE

IF Average >= 80 or Average <=89 THEN

Output “Nice work”

Output “Your average is: “, Average

ELSE

Output : “Your Average is:”, Average

Output “, You will do better next time!”

ENDIF

 

    • 12 years ago
    A+ Answers
    NOT RATED

    Purchase the answer to view it

    • 38.docx