A function is created to represent the amount of money in your checking account. What restrictions would be made to the domain?
the balance is your range, we know as a checking account it might have negative or positive balance and if the balance was in cents then the range is integers. the most logical domain for a function like this is time, and could be restricted in any number of ways.. so the function could return a balance for a given day.. in which case it could be a date.. or a number of seconds, hours or days that have passed from certain day.. say from 1/1/1970. In this case it's resolution could be infinitely variable and doesn't need to be integers, but it must be zero or above. Like it could return a balance for a given time at 10.5 days. Alternately the function might return the balance from a certain deposit or withdrawal index, in this case the domain is an integer, but again it is zero or above and cant be a negative value. In both cases we would assume that 0 is the starting balance.
by 0 is the starting balance, I mean that f(0) would return the starting balance. and f(1) would return whatever happened next to the balance. f(-1) must return an error because there was no account at all before 0
Join our real-time social learning platform and learn together with your friends!