Week 2: Non-Code examples of the pillars of OOP

 

For each of the following scenarios, identify which of the four pillars of OOP [abstraction, encapsulation, inheritance, and polymorphism] the scenario best illustrates.

  1. You pull out your wallet and pick which credit card to use to pay the bill at the grocery store.

  2. You are creating an exam. You open a copy of last year's exam and make a copy. You then go in and change several questions to better fit what you did this semester.

  3. You go to the store and buy a pack of invitations. You add your name, the date, and the location on each card and mail several to your friends.

  4. You ask your child how they did on their spelling test and they tell you that they got a perfect score.

  5. Your child asks you to make them their favorite sandwich. You do.

  6. You are holding parent/teacher conferences. When each parent comes in you talk with them about how their student is doing in the class and what they, as a parent, have agreed to provide for the fall holiday party.

  7. You go to the car dealership to have your oil-changed and new wiper blades installed.

  8. You use the ATM to check on the balance in your checking account.