Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago