If someone has the time can you look at this and let me know what I am missing...I am not sure if my inspector functions are ok and what about the private area???? should there be functions down there also...HELP =)
#include <iostream>
#include <string>
using namespace std;
class StudentAccount
{
public:
// constructor that initializes the data members
StudentAccount(string ID, string name, double init);
// Mutator functions
void setStudentID(string ID);
void setStudentName(string name);
void setBalance(double init);
// Inspector functions
string getStudentID()
{
return studentID;
}
string getStudentName()
{
return studentNAME;
}
double getBalance()
{
return balance;
}
// Facilitator functions
// Add amount to balance
void CreditAccount(double amount);
{ cout<< "Enter the amount to be added;"<< endl;
int amount=0;
float totalbalance=0;
cin>> amount;
amount + balance = totalbalance
}
// Subtract amount from balance. If there is not enough
// money in the account, display an error message and do not
// modify the balance.
void DebitAccount(double amount);
{ balance - amount = balance
if(balance > totalbalance)
{ cout << "There is not enough money in your account to debit that amount"<<endl;
}
// Display all values
void PrintAccount();
private:
string StudentID; // it in the form ###-##-####
string StudentName; // Student's first and last name
double balance; // account balance
};



LinkBack URL
About LinkBacks



