educative.io

Educative

BalanceInquiry - Why attribute and method of type double?

The BalanceInquiry has an attribute account_id of type double and a get_account() method that returns a value of type double. Shouldn’t both of those be of type int? Are we expecting an account_id with decimals? Are we also expecting the get_account() method to return a value with decimals? Both of these should be whole numbers unless I’m missing something here.

I’d appreciate any feedback, thank you.

Hi @Adriaan_Beiertz, thanks for reaching out.
There are some discrepancies in datatypes explained in UML and Code. We`ll update it soon. Thanks for highlighting the issue.

1 Like