English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i need help with making it.

2006-09-18 00:10:03 · 5 answers · asked by Dipz 2 in Computers & Internet Programming & Design

5 answers

Thank God...We have someone who doesn't want an answerer to just do their work for them by providing a complete program.

Well, what exactly do you need help with?
Program checklist:
-allocate variables
-provide input
-process input (error checking)
-calculate input
-provide output messages/queries

In fact, the checklist almost provides the working order of your program.
Do you know how to use the cin and cout functions? You'll need them to get user input, and to display messages.
The simplest of ATM machines:

#include
unsigned int savings=200; // current balance
unsigned int inputnumber; // user input

int main(void)
{
cout << "Withdrawl amount? (0 to exit)\n";
cin >> inputnumber;
if (inputnumber==0)
return 0;
if (inputnumber>200)
{
cout << "You don't have that much, idiot!\n";
return 0;
}
savings=savings-inputnumber;
cout << "Money left: " << savings << "\n";
cout << "Go buy a new hat.\n";
return 0;
}

Look at the checklist. Can you see all the seperate parts of the checklist in the program?

Your programming steps:
Generally, you should try to make the program in pseudo-code first. Don't worry about allocating variables yet. Once you've made the pseudo-code, determine which functions you will need (In this case, cin and cout.) Do you know how to use those functions? If not, there's no point going on - go learn them! Then you should determine how many variables and which types of data for the variables. In my example, I used unsigned integers, but I would have to change the variables to 'float' types, if I expected cents to be included in the withdrawl.
Now, remember the checklist and write down each section of code.

2006-09-18 00:46:56 · answer #1 · answered by Balk 6 · 2 0

Try asking more specific questions. With that question you're basically asking someone to write your project for you. A better way to go about this would be to start coding, then as you reach obstacles, post individual questions detailing the specifics of each problem as you reach it. That way the help you get will be much better directed, and you receive less useless (and sometimes confusing) information.

Rawlyn.

2006-09-18 00:13:48 · answer #2 · answered by Anonymous · 1 0

Ah, you must be a computer science student. I remember getting this exact same project in college.

Rawlyn is correct; you should be a little more specific. I doubt anybody on this board is going to write the whole program for you from scratch.

2006-09-18 00:19:36 · answer #3 · answered by Zombie 7 · 0 0

i've got not got a C++ compiler anymore. I do java now. instantiate your checking account instructions in a considerable.cpp , run it , it rather is going to do what your account , checking constructors do in trouble-free terms. do no longer forget you handed in a stability. Why is there a instantaneous for activity value? i do in comparison to C++ too plenty overhead for some thing rather trouble-free. once you notice your constructor activates are there then upload in techniques debit,credit,displayaccount. write your very own code next time.

2016-12-12 10:27:00 · answer #4 · answered by ? 4 · 0 0

Dipz darling yes you can. Honey here is your link

http://www.google.co.uk/search?hl=en&q=C%2B%2B+program+for+the+working+of+an+ATM+machine&btnG=Search&meta=

2006-09-18 00:26:40 · answer #5 · answered by Joe_Young 6 · 0 0

fedest.com, questions and answers