OOP exercise I got from online.