Uploaded by joohee Jung

Canvas Quiz #13 (Sect. 6.3-6.7)

advertisement
Score for this attempt: 10 out of 10
Submitted Apr 17 at 12:50pm
This attempt took 6 minutes.
Question 1
1 / 1 pts
What does the following UML diagram entry mean?
+ setHeight(h : double) : void
a public method with a parameter of data type double that does not
return a value
a private field called setHeight that is a double data type
a private method with no parameters that returns a double data type
a public field called setHeight that is a double data type
Question 2
1 / 1 pts
________ refers to combining data and code into a single object.
Data hiding
Abstraction
The constructor
Encapsulation
Question 3
1 / 1 pts
To indicate the data type of a variable in a UML diagram, you enter
________.
the variable name followed by the data type
the variable name followed by a colon and the data type
the class name followed by the variable name followed by the data type
the data type followed by the variable name
Question 4
1 / 1 pts
Two or more methods in a class may have the same name as long as
________.
they have different return types
they have different parameter lists
they have different return types but the same parameter list
You cannot have two methods with the same name.
Question 5
1 / 1 pts
The scope of a public instance field is ________.
only the class in which it is defined
inside the class but not inside any method
inside the parentheses of a method header
the instance methods and methods outside the class
Question 6
1 / 1 pts
Overloading means that multiple methods in the same class ________.
have the same name but different return types
have different names but the same parameter list
have the same name but different parameter lists
perform the same function
Question 7
1 / 1 pts
When an object is passed as an argument to a method, what is passed
into the method's parameter variable?
the class name
the object's memory address
the values for each field
the method names
Question 8
1 / 1 pts
A reference variable stores a(n) ________.
binary encoded decimal
memory address
object
string
Question 9
1 / 1 pts
Most of the programming languages used today are ________.
procedural
top-down
object-oriented
functional
Question 10
1 / 1 pts
A UML diagram does not contain ________.
the class name
the method names
the field names
the object names
Quiz Score: 10 out of 10
Download