Can a class implement two interfaces that each contains the same method sig-nature? Explain.
What will be an ideal response?What will be an ideal response?
Yes. The class which implements an interface provides method implementations for each of the abstract methods defined in the interface. In satisfying the requirements for a method of one interface, it simultaneously satisfies the requirements for a method with the same signature in another interface.
Note: this exercise should have been deferred until Chapter 9.
You might also like to view...
You pass a variable by ____ when the receiving procedure needs to know the variable's contents, but the receiving procedure does not need to change the contents.
A. reference B. address C. value D. location
When creating network diagrams, what icon description typically represents a network firewall?
a. An icon that has a hockey-puck shape with two arrows pointing inward and two arrows pointing outward. b. An icon that resembles a brick wall. c. An icon that is rectangular in shape, with squiggly lines on the front. d. An icon that is rectangular, which contains four arrows pointing in opposite directions.
Once your logic enters the body of a structured loop, ____.
A. the entire loop must execute B. the loop can be terminated with a break statement C. the loop will execute indefinitely D. a decision statement will be evaluated
With ______, objects can determine appropriate operations at execution time.
a) encapsulation b) inheritance c) polymorphism d) information hiding