Object Oriented Programming example in swift