1. From the statement “Lincoln is the 16th US presidentâ€, we cancome up with the following designs. Which one is mostappropriate?
a. Two independent Classes: Lincon and President.
b. Two Classes: Lincon and President, with Lincon subclass ofPresident.
c. A class President, with Lincon being an object of the classPresident.
d. None of the above.
4.An advantage of inheritance is that
a. All methods in a super class can be inherited by itssubclasses.
b. All instance variables in a super class can be accessed bysubclasses.
c. An object of a subclass can be treated as an object of thesuperclass.
d. None of the above.
6. Pair programming refers to the style where two programmersswitching their roles in coding and real-time reviewing. Thisencourages:
a. Collective code ownership
b. Cross-learning among peers
c. Code critics and refinement
d. All of the above