Re: Classes- Help A Girl Out :p

Posted 02 April 2003 - 05:26 PM

skyhawk is right, we'd be able to provide more input if we knew what problem you were having. I can, however, give you a few pointers to start with.
#1. You've declared first name and last name as char types, and the address as an int. You may wish to use the inherent string class provided by C++, or failing that, a char array for those variables.

string FirstName;
string LastName;
string address;

or

char FirstName[20];
char LastName[20];
char address[50];

Quote

i need to use the account # as the position in the array
i need to write a program that allows the user to choose whether to:
first load up the customer information for 5 customers

then:
Depsoit
Withdraw
print customers
print transaction for customer
(i guess this would be a menu?)

Re: Classes- Help A Girl Out :p

Posted 02 April 2003 - 09:07 PM

im not sure what i really need to do but this is what i have
after entering the names and ssn number the menu box will come up to choose what you want it to do.
#include <iostream>
#include <iomanip>
#include <string>

Re: Classes- Help A Girl Out :p

Posted 03 April 2003 - 07:05 AM

I think you may be wondering how to load up the information. First thing you'll have to do is declare as many instances of the class as you'll need. From there, once the user has entered information, you'll have to put it in the appropriate variables. The easiest way to do this will be to make some member functions for your classes, most notably for information entry, deletion, and manipulation.
Other notes:

srring accountNum;

should have the keyword string if it's a string, but you mentioned that you would be using that account number as an array index as well. For that, you should make it an int

Also, there was a small error in my display function. "Print transaction" should have a 4 next to it.

Re: Classes- Help A Girl Out :p

Posted 03 April 2003 - 03:10 PM

This is a classic entry-level C++ programming assignment. We used an almost identical project as an assignment halfway through the year for the "C++ for programmers" course at Berkeley. Read the book, follow the lecture notes, and fill in the blanks yourself.

Re: Classes- Help A Girl Out :p

Posted 03 April 2003 - 03:39 PM

cyberscribe, on Apr 3 2003, 05:10 PM, said:

This is a classic entry-level C++ programming assignment. We used an almost identical project as an assignment halfway through the year for the "C++ for programmers" course at Berkeley. Read the book, follow the lecture notes, and fill in the blanks yourself.

Well, that was extremely helpful! If you'd care to read the rules of the forum, we generally try to help people as long as they're giving it a good try themselves. Jill does appear to be giving it a shot.
Is it obviously an assignment from an introductory or intermediate class? Of course it is. Could I write the entire thing, debugged and optimized, in 30 minutes or less? Of course I can. Point is, she does appear to be trying to learn.

Re: Classes- Help A Girl Out :p

Posted 03 April 2003 - 05:55 PM

cyberscribe, on Apr 3 2003, 03:10 PM, said:

This is a classic entry-level C++ programming assignment. We used an almost identical project as an assignment halfway through the year for the "C++ for programmers" course at Berkeley. Read the book, follow the lecture notes, and fill in the blanks yourself.

If you ever come in this forum with that attitude again i will be very angry!!

Jill your doin just fine! you are following the policies perfectly give me some time to look over your code and i will post some help later tonight.