jmb8806
July 31st, 2008, 10:14 AM
i need to create an account class that a bank might use to represent customers bank accounts. i need to include a data member of type int to represent the account balance, provide a constructor that receives an initial balance to make sure that its greater than or equal to 0. if not set the balance to 0 and display an error message indicating that the initial balance was invalid. provide 3 member functions. member function credit should add an amount to the current balance. member function debit should withdraw money from the account and ensure that the debit amount does not exceed the accounts balance. if it does the balance should be left unchanged and the function getbalance should return the current balance . create a program that creates two account abjects and test the member function of class account.
thats my problem i have no idea here to start.
ps i have to write the program in bloodshead
Edit/Delete Message
thats my problem i have no idea here to start.
ps i have to write the program in bloodshead
Edit/Delete Message