Score A+
1. An object's operations are implemented as methods
2. An advantage of composition is the fact that True
we can sometimes reuse classes that we have
already writ- ten, instead of having to design
and write new class- es.
3. In Java a variable must be before it can be used declared
4. In Java class members are declared with the keyword static
5. Method overloading distinguishes between methods both number of
arguments
based on data types of argu-
ments
6. During what activity do we directly analyze
noun/verb analysis
the lan- guage of the problem to identify
objects, their attrib- utes and their
behaviors
7. Immediately after the object's variables are initialized a constructor
is called
8. Every Java program consists of at least one class definition
9. Which of the following is/are true about d) an array
arrays? Choose all that apply. is a set of
a)the elements of an array are accessed by an variables
integer index e) none of
these
b)the elements of an array all located
contiguously in memory
c) the elements of an array all have the
same data type
, CSE 205 Exam Solved Correctly To
Score A+
Answer: a, b, c, d
, CSE 205 Exam Solved Correctly To
Score A+
10. In Java an expression like the one below will evaluate an object
reference
to
new Bunny("Flopsy", 8)
11. Which object oriented element is used to define "has Composition
a" relationships?
12. Which object oriented element is best defined as "ob-
Encapsulation
jects best viewed as packages of responsibility"?
13. Operations are things an object does
14. The object oriented element that allows us Composition
to build more complex objects out of
simpler objects is.
True
15. The differences between value types and
reference types applies to parameters
True
16. Encapsulation is about assigning
responsibilities to objects
17. Which object oriented element is best defined as "an
Data Hiding object should have complete authority
over its re- sponsibilities"?
18. An object is an instance of a class. true
19. The purpose of a constructor is to initialize an object to a
valid state
20. Creating an object of a class is called instantiation