Naked Apartments Interview Question

How would you refactor this small program?