1. From the statement “Lincoln is the 16th US president”, we can come up with the...

70.2K

Verified Solution

Question

Programming

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

Answer & Explanation Solved by verified expert
4.1 Ratings (592 Votes)
1 Choicec is correct ie A class President with Lincon being an object of the class President President being a position and lincon can just hold that position for some years So a class is sort of having a home and    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students