COSC-1337 Chapter 10 Quiz

Ace your homework & exams now with Quizwiz!

All fields declared in an interface: a. are final and static b. have protected access c. must be initialized in the class implementing the interface d. have private access

a. are final and static

An abstract method has: a. only a header and no body b. only a body and no header c. body ends with a semicolon. d. no header and no body

a. only a header and no body

A subclass may call an overridden superclass method by: a. prefixing its name with the super key word and a dot (.) b. prefixing its name with the name of the superclass in parentheses c. using the extends keyword before the method is called d. calling the superclass method first and then calling the subclass method

a. prefixing its name with the super key word and a dot (.)

Like a family tree, a ________ shows the inheritance relationship between classes. a. flowchart b. class map c. class hierarchy d. binary tree

c. class hierarchy

The super statement that calls the superclass constructor: a. must be the first statement in the superclass's constructor b. can appear in any method of the subclass c. must be the first statement in the subclass's constructor d. is deprecated and is no longer supported in newer versions of Java

c. must be the first statement in the subclass's constructor

All methods specified by an interface has default a. private access b. protected access c. public access d. packaged access

c. public access

What key word can you use to call a superclass constructor explicitly? a. goto b. this c. super d. extends

c. super

A protected member of a class may be directly accessed by: a. methods of the same class b. methods of a subclass c. methods in the same package d. All of the above

d. All of the above

When an "is a" relationship exists between objects, it means that the specialized object has: a. some of the characteristics of the general class, but not all, plus additional characteristics b. some of the characteristics of the general object, but not all c. none of the characteristics of the general object d. all the characteristics of the general object, plus additional characteristics

d. all the characteristics of the general object, plus additional characteristics

If you do not provide an access specifier for a class member, the class member is given ________ by default. a. private access b. public access c. protected access d. package access

d. package access


Related study sets

Ch. 4: System Software - The Control Center of Your Computer

View Set

Chapter 5A.1 Passato Prossimo with Essere

View Set

Accounting 2302 Chapter 14: The Statement of Cash Flows

View Set

Physiology Chapter 1 - The Study of Body Function

View Set

KIN 3502 FINAL -- ch 11, kin hhhh, KIN 3502 - Sport Skills & Motor Abilities (Chap. 11), KIN 3502 - Final - Chap. 12 Quiz (Psychological Measures), KIN 3502 - Exam 2 - Chap. 9 Quiz, KIN 3502 final -- ch 12, Kin 3502 Final- Psychological Measurements

View Set

World History: SOCIAL CHANGES: POSITIVE CONTRIBUTIONS

View Set

BL-Linux Chapter 12 - Shell Scripting

View Set

MUS 110 CH 15 Listening Study Guide: LG 4 Farmer: Fair Phyllis

View Set