Question: Question 1 Which of the following things does this statement do? Color darkBrown = new Color( 120, 160, 0 ); A. declare a new variable
Question 1
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
Question 2
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
Question 3
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
Question 4
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
Question 5
What are the different views of a class?
I. Source code
II. UML Class Diagram
III. Javadoc comments
A. I
B. I & II
C. II & III
D. I, II, & III
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
