Questions and CORRECT Answers
An advantage of composition is the fact that we can sometimes reuse classes that we have
already written, instead of having to design and write new classes. - CORRECT
ANSWER - True
In Java a variable must... - CORRECT ANSWER - a) zeroed before it can be used
b) be normalized before it can be used
c) be deleted before it can be used
d) be initialized before it can be used
e) None of the above
Answer: e): None of the above
If "declared before it can be used" is an option choice, choose that instead of e)...
In Java class members are declared with the keyword ______ - CORRECT ANSWER - a)
static
b) global
c) local
d) void
Answer: a) static
Method overloading distinguishes between methods based on _____ - CORRECT
ANSWER - a) number of lines of code
b) use of loops
c) none of these
d) argument count only
, Answer: c) none of these
During what activity do we directly analyze the language pf the problem to identify objects, their
attributes and their behaviors - CORRECT ANSWER - a) class outlining
b) none of these
c) noun/verb analysis
d) problem description
e) use case diagramming
Answer: c) noun/verb analysis
Immediately after the object's variables are initialized _________ - CORRECT
ANSWER - a) the object is destroyed
b) the object is suspended
c) a constructor is called
d) the object is ready for use
e) none of these
Answer: c) a constructor is called
Every Java program consists of at least one _____. - CORRECT ANSWER - a) class
definition
b) none of these
c) while loops
d) condition
e) System.out.println statement.
Answer: a) class definition