#include <iostream>
#include <cstring>
using namespace std;
class Account
{
private:
char number[8]; //account number
char type; //account type s r or l
char owner[30]; //name of the owner
double balance; //amount of money in the account
double InterestRate; //interest
public:
Account(); // constructor
void setNumber (char *num); // function takes char and
void setType (char); // takes character and returns void
void setOwner (char []); // takes character array and returns void
void setBalance (double); // takes double and returns void
void setInterestRate (double); // takes double and returns void
Not going to comment your code, and not going to keep reading this thread either, but:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
class Account
{
private:
char number[8]; //account number
char type; //account type s r or l
char owner[30]; //name of the owner
double balance; //amount of money in the account
double InterestRate; //interest
//...
}
Account :: Account()
{
number[8]='\0';
type='S';
owner[30]='\0'; // set the default values for constructor
balance=0.0;
InterestRate=0.05;
}