1834429 Members
2070 Online
110067 Solutions
New Discussion

Re: C++ forum?

 
SOLVED
Go to solution
Mike_389
New Member

C++ forum?

Is the a forum on here that could help with some c++ codes?
9 REPLIES 9
Pete Randall
Outstanding Contributor
Solution

Re: C++ forum?

None specifically, but ask away - someone will most likely be able to help.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: C++ forum?

Just post it under languages.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: C++ forum?

I thought there used to be a languages section, but I couldn't find it, Clay.


Pete

Pete
Mike_389
New Member

Re: C++ forum?

i looked for the languages section but cant find it. let me gather my thoughts and illpost my problem. thanks
Mike_389
New Member

Re: C++ forum?

This is what i need to do in C++
I am creating 2 classes first one is called customer. and it has the first name, last name, address, account #. in it
the second one is a class called transaction that has account#
Type (W,D) (withdraw, Deposit)
and amount.

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?)

this is what thses need to do:

deposit and withdraw will prompt the user for the account # (array position) and amount

ptint customers will show all data( account number, names, balance)

print transaction for customer willprompt for a account and then print all of the transactions (type, Amount)


Steven E. Protter
Exalted Contributor

Re: C++ forum?

There is a languages forum, but more people read here so you'll get answers faster.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: C++ forum?

Mike_389
New Member

Re: C++ forum?

is this correct so far for the 2 classes?

#include
#include

using namespace std;

class Customer
{
private:

public:
char FirstName;
char LastName;
int address;
int accountNum;
}

class Transaction
{
private:
public:
char Type; // (W,D) (withdraw, Deposit)//
int amount;
}
Michael Armbrecht
Frequent Advisor

Re: C++ forum?

Hello Mike,

I don't know the environment your program is going to run in and how your classes will be used, but I would make the attributes of both classes private and provide member functions to read out the values and to manipulate them, as well as to do sanity checks on the data. You definitely wouldn't want to have someone put in an account no. like "gronk"...
Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic.