We have updated the content of our program. To access the current Software Engineering curriculum visit curriculum.turing.edu.
Abstraction and Encapsulation
Learning Goals
- Students are able to use classes and methods to make abstractions that improve code quality
- Students are able to write classes that demonstrate encapsulation of data
- Students are able to explain how their code achieves abstraction and encapsulation
Part 1: Solo Research (10 minutes)
Research the following questions:
- What is Abstraction?
- What is Encapsulation?
Part 2: Group Chart Paper (20 minutes)
As a group, create a chart paper with the following:
- What is Abstraction?
- Explain abstraction using a metaphor.
- What is Encapsulation?
- Explain encapsulation using a metaphor.
Part 3: Paired Coding (30 minutes)
- Clone down Driving Simulator.
- With your partner, discuss some of the additions suggested in the README. Note: you should not actually implement the additions right now. Simply talk through them.
- Discuss the questions in the README.
- Finally, take some time to refactor the existing code.
Checks for Understanding
- What is Abstraction? Why is it important?
- What is Encapsulation? Why is it important?