Above is a pic of a UML diagram I got today in class and I am supposed to convert that UML diagram into code. My specific problem that im having trouble with is that I am having trouble with the checking class. I dont understand what its supposed to do. I just dont understand what chargepercheck,numCheckand minBalance are supposed to do Im just so lost... Any help would be apreciated. Thanks!
It looks like numCheck is the physical check number, minBalance is the minimum amount the customer should have in their account to approve a transaction. chargePerCheck could either be a per-transaction fee (which is rate, but exists), or the amount charged for a specific transaction.
Are you more confused about the implementation? It sounds like you could go a number of ways with this. Vectors pop out to me right away though, as you can create/access data easily that way.
It's kind of rudimentary in terms of how an account is represented (I work for a major Financial Institution so this is kinda an area of expertise for me). numCheck could be the number of checks issued, or it could be representing the number of checks allowed per month, to be honest the variable name doesn't really make a lot of cents (haha, get it). chargePerCheck would be a fee charged for each check written (some institutions will usually charge a fee for each check written after a certain initial allowance per month).
Anyways, Bank would be one class, and in a Bank you would have a series of accounts, so there would likely need to be a function in Bank to create an account. Each account could be either a checking or savings (in this example) so Checking and Savings would inherit Account (since each is a type of account but different in that Checking would have checks but in this example does not generate any interest, whereas Savings does not have checks but does generate interest). Each account also has a Customer who owns the account.
Essentially you need a class for Bank, a class for Account, a class for Customer, and a class for Savings and one for Checking, but Savings and Checking need to inherit Account (I assume since this is an assignment you've gone over the simple points of polymorphism and inheritance).
Good luck and be sure to post responses if you need any more help.