CS180 REVISION STUDY EXAM QUESTIONS
AND ANSWERS UNIVERSITY OF CALIFORNIA
What does the following UML diagram entry mean?
+ setHeight (h : double) : void
a) a public method with a parameter of data type double that does not
return a value
b) a private field called setHeight that is a double data type
c) a private method with no parameters that returns a double data type
d) public field called setHeight that is a double data type
Verified Answer -a public method with a parameter of data type double
that does not return a value
A class specifies the ____ and ____ for a particular type of object.
a) relationships, ,methods
b) fields, object names
c) fields, methods
d) relationships, object names
Verified Answer -fields, methods
It is common practice in object-oriented programming to make all of a
class's ____.
a) fields private
b) methods private
c) fields public
Category | Study Material |
Comments | 0 |
Rating | |
Sales | 0 |