Yeah, that works too! I prefer a more functional approach though, that's pretty much what I described :) this is more OOP.
But as long as you and any person who hasn't seen your code can read it, anything works!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.