ATM program set assignment

Please post ATM.h. Also, please edit your post and add code tags to the code. Just highlight the code and click the "<>" button to the right of the edit window.

In the second constructor, you can't do this:
day + month + year = dob;
I think you should call parseDOB(dob) here instead. Also call parseName(nane) to set the name.

In deposit(), why can't you deposit money when the balance is negative? You should always be able to make a deposit.

In withdraw() you return if the balance <= 0. As written, I could successfully withdraw $10,000 from an account with a balance of $1. That's probably not right.

For isValidPin, I think the condition should be:
1
2
3
        return (firstDigit != secondDigit && firstDigit != thirdDigit && firstDigit != fourthDigit &&
                secondDigit != thirdDigit && secondDigit != fourthDigit &&
                thirdDigit != fourthDigit);


for the deposit part it's just instructions from the lecturer. and I will look at the withdraw and isvalid pin right now. Also what you said about dob and name makes so much sense, thank you.
Do not erase your posts. Now others cannot learn from your mistakes. That is really sad.
Topic archived. No new replies allowed.