Question: 1) An object's properties are also known as what? a) methods b) instance variables c) orientations d) messages e)class variables 2) What is another name

1) An object's properties are also known as what?

a) methods
b) instance variables
c) orientations
d) messages
e)class variables

2) What is another name for an object?

a) a method
b) a variable
c) a data type
d) an instance of a class
e) a gadget

3) Which of the following statements is FALSE?

a) A private method may be called from anywhere within the class in which it is declared.
b) A public attribute may be examined from anywhere in the program, but may not be changed.
c) The keyword void indicates that a method does not return any value.

4) Which of the following things does this statement do? Color darkBrown = new Color( 120, 160, 0 );

a) declare a new variable
b) construct a new object
c) create a binding
d) All of the above
e) None of the above

5) An object diagram represents what?

a) the makeup of a class
b) the state of memory at a particular point during the execution of a program
c) the collection of all possible objects
d)the same thing as a flowchart

6) When drawing an object diagram, you evaluate a series of program statements to figure out how they change the contents of memory. Which of the following is a question you should ask as you evaluate each line of code?

a) Does the line of code declare a variable?
b) Does the line of code instantiate an object?
c) Does the line of code create a binding?
d)All of the above
e)None of the above

7) Which of the following valid statements declares a variable? /* 1 */ Oval dot = new Oval(); /* 2 */ dot.setColor( new Color( 0, 0, 255 ) ); /* 3 */ dot.setFilled(); /* 4 */ Oval circle; /* 5 */ circle = dot;

a) 1
b) 1 and 2
c) 1 and 4
d) 1, 4 and 5
e) None of the above

8) Which of the following valid statements creates (constructs) an object? [Read very carefully!] /* 1 */ Oval dot = new Oval(); /* 2 */ dot.setColor( new Color( 0, 0, 255 ) ); /* 3 */ dot.setFilled(); /* 4 */ Oval circle; /* 5 */ circle = dot;

a) 1
b)1 and 2
c)1 and 4
d)1, 4 and 5
e)None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!