![]() |
| ||
| a department-store customer progam hello everyone. i'm developing a program from a department-store customerhas exceeded the credit limit on a charge account.for each of the following facts are available.account no,balance of the begining of the month,i total of all items charged by this customer,total of all credit applied to this customer.'m required to instal all the items using while loop. so what i did is, int enterInfo=0; while(enterInfo<5) (x++); do{ int account,startBalance,endBalance.allowed,credits,charges; cout<<"enter account number"; cin>>account; cout<<"enter credits applied to account"; cin>>credits; cout<<"enter credit card charges"; cin>>charges; cout<<"enter starting balance"; cin>>startbalance; cout >>"credit limit?"; cin>>allowed; so i don't know how to proceed and ene the program please someone help |
| ||
| Re: a department-store customer progam you probably want to create a structure to hold the data for each customer so that the values will not disappear on each iteration of the do-loop. Then you will need an array or a linked list of those structures. After entering the account number search the array or list for the structure that contains that account number. If found then adjust the members of the structure with the values you enter in the do-loop. If the structure is not in the list, fill out a new structure and add it to the array or list. |
| ||
| Re: a department-store customer progam so how must i go about doing that i mean the pseudocode of th program |
| ||
| Re: a department-store customer progam to get you started struct Customer |
| ||
| Re: a department-store customer progam There are many options available to you. Personally, I would suggest using classes over structs in c++, as you can also define private member functions. If you are using an array of objects don't forget to clear up after with delete[]. You could also use a vector of objects. But the most important thing is, if you had to ask what they are, you probably need to read up on them before even attempting to integrate their usage in your current program. |
| ||
| Re: a department-store customer progam Quote:
|
| All times are GMT -4. The time now is 6:08 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC