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.
- You pull out your wallet and pick which credit card to use to pay the bill at the grocery store.
- 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.
- 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.
- You ask your child how they did on their spelling test and they tell you that they got a perfect score.
- Your child asks you to make them their favorite sandwich. You do.
- 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.
- You go to the car dealership to have your oil-changed and new wiper blades installed.
- You use the ATM to check on the balance in your checking account.