Hw2: OOP approach
Comparisons are not calculated correctly