C1S247B – Java – Quiz week 5 (Sample) Solution – Guaranteed 100% score

Lab Price = $10
[orb_cyber_store id=”269″]
Please feel free to send us your queries at: support@iqrajavaid.com
Problem Statement
1. (TCO 7) If a class contains an abstract method, the class must be declared _____. (Points : 2)
abstract
public
private
None of the above

2. (TCO 7) An abstract _____ is used only to form related subclasses using inheritance since it cannot be instantiated. (Points : 2)
method
class
object
attribute

3. (TCO 7) How is an abstract method different from a regular method? (Points : 2)
It can only be declared in an abstract class.
It is declared with the reserved word abstract.
It does not contain a method body
All of the above

4. (TCO 7) Which of the following classes is most likely an abstract class? (Points : 2)
Vehicle
BlueSpruce
HandSaw
Goldfish

5. (TCO 7) In terms of object-oriented programming, a(n) _____ is a mechanism that forces a programmer to adhere to specific rules when developing an application. (Points : 2)
contract
base class
requirements analysis
method signature
None of the above

6. (TCO 7) _____ and _____ can contain abstract methods. (Points : 2)
Abstract classes; base classes
Abstract classes; interfaces
Interfaces; base classes
None of the above

7. (TCO 7) C++ allows for the implementation of multiple inheritance whereas .Net and Java do not. However, in languages such as .Net and Java, _____ can be used to simulate multiple inheritance. (Points : 2)
abstract methods
base classes
interfaces
implementations

8. (TCO 7) Which of the following class definitions defines a legal abstract class? (Points : 2)
class abstract Dog {
void grow();
}
public abstract class Dog {
void eat (){}
}
abstract private class Dog {
void eat ();
}
public class abstract Dog {
void eat (){}
}

9. (TCO 7) Which of the following declares an abstract method in an abstract Java class? (Points : 2)
public abstract pay();
public void pay() {}
public abstract void pay();
public abstract void pay() {}

10. (TCO 7) Which of the following statements is true? (Points : 2)
Interfaces contain a list of already implemented methods.
Interfaces contain a list of pre-defined attributes with default values .
All methods defined in an interface must be implemented by any class that chooses to implement the interface.
At least one of the methods defined in an interface must be implemented by any class that chooses to implement the interface.

Instructions
* Please click on “Buy Now” button to complete the purchase.
* The solution will be emailed to the email address you are going to enter in paypal.
* Your paypal has to be pre-loaded in order to complete the purchase or things may not work for you.
* All the contents are compressed in one zip folder.
* In case of any query, please donot hesitate to contact us on support@iqrajavaid.com.
********************************** Good Luck**********************************
Payment Details
Lab Price = $10
[orb_cyber_store id=”269″]
Please feel free to send us your queries at: support@iqrajavaid.com

Leave a Reply