As described earlier in the What is an ICO? section, a minimal implementation of a token would only really need a way to store the balance of a given address (in reality, a way to transfer balances between different addresses would also be required for such a minimal implementation). In Solidity, we can represent balances by using a mapping, as follows:
mapping (address => uint256) public balanceOf;
Again, by declaring this state variable as public, we generate the associated getter function.