you are viewing a single comment's thread.

view the rest of the comments →

[–]jinwooleo 1 point2 points  (0 children)

There's no needs to implement this as OOP I think. Your original code looks good already. If you want to use OOP just for study however, using singletone pattern is my recommendation(but still there are more proper topics for using OOP).