Bank Automatic Teller Machine (ATM)

Urgent please..

Project Description:-
• This project is a software that runs on an ATM of a bank.
• It asks the client if he is a new client or already having an account in the bank.
• For New Clients:
1. Ask for the client's information (name, address, telephone, mobile number and email address).
2. Give him an account number. (generated automatically and must be unique)
3. Ask him to enter a password to be saved for his account.
• For Existing Clients:
• It asks the client for his account number and password.
• It gives the client a menu to select from the processes he can do.
1. He can check his balance amount.
2. He can input some money in his balance (He's asked to enter the amount of money he's going to add to his balance).
3. He can withdraw from his balance (He's asked to enter the amount of money he's going to withdraw from his balance).
4. He can edit his information.
Cool, so you know what you're supposed to do. Now what do you plan to do about it?

EDIT:
It's often frowned upon to simply do someones homework assignment for them on this forum. Many users would be much more willing to assist you after they've seen that you have put out an effort to accomplish the task yourself.
Last edited on
What is the profit if I didn't try to make it by myself ? :)
The problem is..My code can make it for a single user not multible users..

http://ideone.com/ZLeYOR
mahmoudcleticwarrior wrote:
What is the profit if I didn't try to make it by myself
That's the exact point. You would be surprised how many people just want their homework done without understanding it. So it's become rule to provide some example of what you've already done, and specific problems you're having.

I'm going to pose several suggestions for your code. But first I have a few questions for you, so I can get an idea of what topics i can and cannot go into for this assignment.

Have you gotten into classes and the object-oriented side of C++?
Have you discussed the use of STL containers such as vectors?
I have gotten into:
Arrays,functions,strings & little about struct.
Looks like you're perfect programmer..Programming is wonderful,but I feel weakness in my coding or may be my logic.
There will be a contest after 6 weeks in our faculty,I fear contests and there is some students in the same year of mine that have a good idea..Some of them started coding xo while i was getting in if condition !!!
They are strong and I wouldn't get them in the contest I'm sure :(..
On the other hand,there is study and i have to get good grades..In brief,I have only 2 weeks before the contest.
I'm sure that u have something to say about that :D
Okay, well, that's a bit limited. What i would really recommend for you is to read up on classes. (keep in mind, the only difference between class and struct in C++ is that class members are default private)

How I would approach this problem:
Create a client class, which would look something along the lines of this:
1
2
3
4
5
6
7
8
9
10
11
12
class Client
{
public:
    //functions here to do all the things you want with Client
    //such as:
    Client(std::string _fname, std::string _lname /*....*/) //constructor that sets data member values
    void printInfo() //prints all info
    bool checkPassword(string pwd) //returns true if the pwd matches password.
private:
    std::string fname, lname, address, telephone, mobile, email, password
    int accNumber;
};


If you have your code structured like that, it accomplishes two very important things. The first is that everything is extremely organized. The second is that it's the beginning of grounds to create multiple clients.

1
2
3
4
5
6
7
8
9
10
int main()
{
    Client clientOne;
    clientOne.create() //assuming we created a function called create.
    //create would call things like firstname(), lastname(), telephonenum(), and such
    //that you defined in your existing code.

    Client clientTwo;
    //....
]


You could continue to create a vector that holds all the clients. If you haven't heard of a vector, it's like a dynamically expanding array; so the size isn't fixed and you can put as many items in it as you want.
http://www.cplusplus.com/reference/vector/vector/

Since this is a larger project idea, consider getting a pencil and paper and mapping out how you want it to be structured before you get to coding. That's always really helpful.

Hope I helped without creating too much confusion.
Topic archived. No new replies allowed.