bootcamper bootcamper SetUp Docs Reps Blog
bootcamper bootcamper

U5L02 - Access Modifiers - no-drill-splainer

May be that this is not testable and so we should furnish a splainer instead?

Cannot figure out how to test this yet. Why? Because here is what this lesson is about. None of it seems to lend itself to a unit test of any type that I can think of.

  • adding private modifier breaks previous code
  • why restrict visibility?
  • something here about breaking the compile
  • another motive - abstract or hide away the details
  • pretty much always make instance variables private
  • leads to getters and setters next lesson

Takeaways

Since you can't do drills you better have really solid ability to splain this whole lesson in your own words and be solid with it.