2551.quiz5.Summer2010 - a whole-part relationship b is_a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
COP 2551 – Quiz #5 Summer 2010 Name: ___________________ Quiz is worth 10 points. You may, however, earn 11 points! 1. (True, False) Versions of overloaded methods are distinguished by the number, type, order of parameters and the return type. 2. (True, False) Static variables (class variables) may be referenced outside of the class within which they are defined via the ClassName.variableName. 3. (True, False) A Constructor can only have the return type of void. 4. (True, False) Constructors may be overloaded. 5. (True, False) A static variable can only be accessed via a static method in the class. 6. (True, False) Static methods are allowed to access instance variables, once objects are created. 7. … (Circle your choice) Aggregation is sometimes described as a:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a. whole-part relationship b. is_a relationship b. dependency relationship d. associative relationship 8-9. Write a method called ‘average’ that accepts two integer parameters and returns their average as a floating point value. (Exercises at end of chapter and on my web page) 10. (True, False) The ‘this’ reference allows a programmer to distinguish the instance variables of a class from corresponding method parameters with the same names. 11. In a relationship between objects of classes, when one object sends a message to another object of a different class expecting services to be provided, we would normally term this a: a. dependency b. aggregate c. inheritance d. polymorphism...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online