[Help] how to call a class that can return a value in number? [urgent]

I know how to pass a value to a class that need to be called, but how to call a class that returns a value?

can someone show me how to call it and how to write the class that returns a number?