Quiz #3
Friday
With a piece of paper, write down your name and answers to the following questions.
What is the Java keyword that can be used to represent an instance of the class in which it appears and can be used to access class variables and methods?
me
this
that
self
What object collaboration relationship does the following UML diagram demonstrate?
- Nesting
- Aggregation
- Concatenation
- Class Fielding
Should class designers avoid returning references to mutable private fields because doing so may allow users of the class to adversely affect the internal state of an object?
Answer: Yes, they should avoid returning references to mutable private fields.
What is the output of the following program?
public class Program { public static void main(final String[] args) { System.out.println(Gender.Male); } } enum Gender { Confidential, Male, Female; }
Answer:
Male
Student Performance and Statistics
A histogram of student performance on percentage grades for Quiz 3 on Friday.
A table showing the average performance for each question in Quiz 3 on Friday.