![]() |
|
#1
|
|||
|
|||
Banking LabPlease take a look at this code and help me to finish:
CPP / C++ / C Code:
Thanks Thomas Last edited by LuciWiz : 11-Jun-2007 at 07:13.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#2
|
|||
|
|||
Re: Banking LabQuote:
Regards, Dave |
|
#3
|
|||
|
|||
Re: Banking LabI guess you want to read the input from file.
|
|
#4
|
|||
|
|||
Re: Banking LabQuote:
You are declaring accountType as a char and asking your program to see if it is less than a double called minimum. The idea of comparing an account "type" to what appears to be a minimum account "balance" sounds fairly wrong to me. Let's assume that we had a few different TYPES of (bank) accounts, such as: Checking Savings Money Market CD ...etc: ...and that we assigned some type values that map to these names. Let's say: CPP / C++ / C Code:
That way, when we were reading in a file, we could have a minimum account balance for each type such that: CPP / C++ / C Code:
...might make sense for each corresponding account type. That is, the index of each element in the two arrays coincide with their respective intention. AccountTypes[0] is a kind of "checking" account where the minimum balance required would be contained in MinimumBalances[0] whose value is assigned to be $1000.00 else: CPP / C++ / C Code:
...one would be charged UnderMinimumBalanceServiceFees[0] ($10.00) if their balance for that TYPE of account went below the MinimumBalances[0] amount. Here is what it might look like in "code:" CPP / C++ / C Code:
:davis: |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The