8

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

fields; methods

A class specifies the ________ and ________ that a particular type of object has. relationships; methods fields; object names fields; methods relationships; object names

d

A constructor is a method that: a) returns an object of the class. b) never receives any arguments. c) with the name ClassName.constructor. d) performs initialization or setup operations.

c

A constructor: a) always accepts two arguments b) has return type of void c) has the same name as the class d) always has an access specifier of private

braces

After the header, the body of the method appears inside a set of: brackets, [] parentheses, () braces, {} double quotes, ""

t

An object can store data. True False

instance of a class

Another term for an object of a class is: access specifier instance of a class member method

methods

Class objects normally have ________ that perform useful operations on their data. fields instances methods relationships

d

Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished in Java by: a) using the public access specifier on the class methods b) using the private access specifier on the class methods c) using the private access specifier on the class definition d) using the private access specifier on the class fields

d

For the following code, which statement is NOT true? a) x is available to code that is written outside the Circle class. b) radius is not available to code written outside the Circle class. c) radius, x, y, and z are called members of the Circle class. d) z is available to code that is written outside the Circle class.

a

For the following code, which statement is NOT true? a) x is directly available to code that is written outside the Circle class through object of a Circle. b) radius is directly available to code written outside the Circle class through object of a Circle.. c) radius, x, and y are protected members of the Circle class. d) y is directly available to code that is written outside the Circle class through object of a Circle.

522

Given the following code, what will be the value of finalAmount when it is displayed? 528.00 580.00 522.00 There is no value because the object order has not been created.

class; objects

In the cookie cutter metaphor, think of the ________ as a cookie cutter and ________ as the cookies. object; classes class; objects class; fields attribute; methods

t

Instance methods do not have the key word static in their headers. True False

static

Instance methods do not have this key word in their headers: public static private protected

fields private

It is common practice in object-oriented programming to make all of a class's: methods private fields private fields public fields and methods public

String

Java allows you to create objects of this class in the same way you would create primitive variables. Random String PrintWriter Scanner

a

Look at the following statement. import java.util.*; This is an example of: a) a wildcard import of all classes in java.util package b) an explicit import of only one class c) unconditional import or two required classes d) conditional import o only one class

b

Look at the following statement. import java.util.Scanner; This is an example of a) a wildcard import b) an explicit import c) unconditional import d) conditional import

instance methods

Methods that operate on an object's fields that are known also as instance variables are called: instance variables instance methods public methods private methods

t

The java.lang package is automatically imported into all Java programs. True False


Kaugnay na mga set ng pag-aaral

Plant Diseases: http://www.ipm.ucdavis.edu/PMG/menu.disease.html

View Set

Chapter 19: Evaluation and Management

View Set

California Real Estate Exam Multiple Choice Questions

View Set

Nursing Assessment: Sensorineural Function

View Set

AP PSYCH UNIT 5 TEST- States of Conciousness

View Set

Uppers, Downers, and All Arounders 8th ed. Chapter 2

View Set

310 Ch 7 Episodic and Semantic Memory

View Set