Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
26 Cards in this Set
- Front
- Back
Methods in different classes with identical names and identical parameter lists are
a. overloaded b. illegal c. both of these d. none of the above |
D
|
|
Methods in the same class with identical names and identical parameters lists are ______
a. overloaded b. illegal c. both of these d. none of the above |
B
|
|
A class contains a method with the header void printData(string name, string address). Which of the following methods can coexist in the same class with no possible ambiguity?
a. string printName(string name, num amount) b. void printName(string name) c. void printData a. All of these can coexist without ambiguity |
NOT SURE
|
|
A class contains a method with the header num calculateTaxes(num amount, string name). Which of the following methods can coexist in the same class with no possible ambiguity?
a. num calculateTaxes(string name, num amount) b. string calculateTaxes(num money, string taxpayer) c. num calculatetaxes(num annualPay, string taxPayerId) d. All of these can coexist without ambiguity |
NOT SURE
|
|
When you overload a method, you write multiple methods with the same _________
a. name b. parameter list c. number of parameters d. return type |
A
|
|
An object can be ____________
a. stored in an array b. passed to a method c. returned from a method d. all of the above |
NOT SURE
|
|
Assume you have created a class named MyClass and that is contains a private field named
myField and a nonstatic public method named myMethod(). Which of the following is true? a. myMethod() has access to and can use myField b. myMethod() does not have access to and cannot use myFeild. c. myMethod() can use myField but cannot pass it to other methods. d. myMethod() can use myField only in myField is passed to myMethod() as a parameter. |
NOT SURE
|
|
Assume you have created a class named Object and and object from it named myObject.
Assume the class contains a field named size that is returned by the class's getsize() method. Assume a working program contains the following statement: output myObject.getsize() Which of the following is true? a. size is a numeric filed b. size is a static field c. size is an instance variable d. all of the above |
NOT SURE
|
|
Which of the following is true?
a. size is a numeric filed b. size is a static field c. size is an instance variable d. all of the above |
NOT SURE
|
|
Assume you have created a class named MyClass, and that a working program contains the
following statement: output myClass.number a. number is a numeric field b. number is a static field c. number is an instance variable d. all of the above |
NOT SURE+
|
|
By default, methods contained in a class are _________________ methods.
a. static b. nonstatic c. class d. public |
NOT SURE
|
|
Inheritance give a programmer the ability to __________.
a. write programs that otherwise could not be written b. develop programs more quickly c. both of these d. none of these |
NOT SURE
|
|
If a superclass constructor requires arguments, its subclass ______________.
a. must contain a constructor b. must not contain a constructor c. must contain a constructor that requires arguments d. must not contain a constructor that requires arguments |
NOT SURE
|
|
When you instantiate an object that is a member of a subclass, the ______ constructor executes first.
a. subclass b. child class c. extended class d. parent class |
NOT SURE
|
|
If a child class method has the same name but a different parameter list than a method in the
parent class, the subclass method _____ the parent class version. a. oversees b. hides c. overloads d. overrides |
NOT SURE
|
|
Classes that depend on field names from parent classes are _____________.
a. broken b. polymorphic c. fragile d. sturdy |
NOT SURE
|
|
In object-oriented programming terminology, an unexpected or error condition is a(n)
__________. a. anomaly b. aberration c. deviation d. exception |
NOT SURE
|
|
A programmer can recover from ____________ errors.
a. all b. some c. only unpredictable d. no |
NOT SURE
|
|
When a program might generate an exception, you ___________________.
a. must write statements to handle it b. must write a class to handle it c. can choose to handle it or not d. cannot handle it; the operating system must do so |
NOT SURE
|
|
In object-oriented terminology, you __________ a series of steps or a procedure when you
think it might throw an exception. a. try b. catch c. handle d. encapsulate |
NOT SURE
|
|
A catch clause ____________ an exception.
a. tries b. returns c. handles d. encapsulates |
NOT SURE
|
|
The detailed specification of how all the parts of a system will be implemented and
coordinated is called _________________. a. programming b. paraphrasing c. system design d. structuring |
NOT SURE
|
|
The primary purpose of good modeling techniques is to _________________.
a. promote communication b. increase functional cohesion c. reduce the need for structure d. reduce dependency between methods |
NOT SURE
|
|
The Unified Modeling Language provides standard ways to do all of the following to
business systems except _____________ them. a. construct b. document c. describe d. destroy |
NOT SURE
|
|
The UML is commonly used to model all of the following except _________________.
a. computer programs b. business activities c. organizational processes d. software systems |
NOT SURE
|
|
The UML was intentionally designed to be ___________________.
a. low-level, detailed-oriented b. used with Visual Basic c. nontechnical d. inexpensive |
NOT SURE
|