Astranis interview question

Implement a class that solves this simple problem by returning a value based on the data stored in each instance of a class