Question
Asked by:
ynkeefn72
ynkeefn72
Rating : No Rating
Questions Asked: 20
Tutorials Posted: 0
 

$12.00 Programming Help with C++

Q:
Here is another program that I am in need of some assistance on. It is not due for another two weeks or so, but figured I would post it early:

Create a Bank Account class with appropriate data members and member functions--think of the attributes or features of a bank account---think of the kind of data (and actions) you need to open an account. Create a Checking Account class which will inherit from the Bank Account class, but will also contain some of its own data members and member functions (think of attributes and actions specific to checking accounts). Checking accounts need an initial deposit so that you have money in the account to write checks against. You can assume that your checking account has fees associated with it--even if you would not sign up for a fee based account! Write the code to test your Checking Account class. Submit your zipped code.
 


   
   
   
   
 
Available Tutorials to this Question
Posted by:
Neel
Neel
Rating (237): C
Questions Asked: 0
Tutorials Posted: 1637, earned $2,004.41
 

$12.00 Programming Help with C++

  • This tutorial hasn't been purchased yet.
  • Posted on Feb 23, 2009 at 11:29:43PM
A:
Preview: ... <br>I have co ...

The full tutorial is about 7 words long plus attachments.

Attachments:
bank.zip (1K)
Posted by:
Albertom
Albertom
Rating (118): B
Questions Asked: 0
Tutorials Posted: 738, earned $353.88
 

$12.00 Class Tutorial

  • This tutorial hasn't been purchased yet.
  • Posted on Feb 23, 2009 at 6:25:42PM
A:
Preview: ... to follow, and modify.<br>I wrote the program only for one deposit and one withdraw,<br>you can modify it to do many, you could use a do-while loop and/or arrays.<br>You can work with the base class independently of the derived class. The derive class uses function of the base class,so you need it, in order to work with this c ...

The full tutorial is about 264 words long plus attachments.

Attachments:
bank.zip (10K)
Posted by:
rainman
rainman
Rating (40): A+
Questions Asked: 2
Tutorials Posted: 174, earned $906.64
 

$12.00 C++ Bank Account Inheritance program. Lots Of Attributes. Lots Of Comments. Compiles With MS Visual Studio C++ 2008.

  • This tutorial was purchased 4 times and rated A+ by students like you.
  • Posted on Feb 24, 2009 at 1:13:15PM
A:
Preview: ... matter which class<br> //or object it is used in.<br> static const double interestRate; <br><br>};<br><br>const double BankAccount::interestRate = 0.01; //set the rate wqual to 1%<br><br>BankAccount::BankAccount(string f, string l, int n, double amount)<br>{<br> firstName = f;<br> lastName = l;<br> accountNumber = n;<br> balance = amount;<br>}<br><br>string BankAccount::getName()<br>{<br> //returns a full string of the name for example if the first name is John and the last<br> //name is Doe it will return the string "John Doe".<br> string name = firstName + " " + lastName;<br> return name;<br>}<br><br>void BankAccount::setName(string f, string l)<br>{<br> firstName = f;<br> lastName = l;<br>}<br><br>int BankAccount::getAccountNumber()<br>{<br> return accountNumber;<br>}<br><br>void BankAccount::setBalance(double bal)<br>{<br> balance = bal;<br>}<br><br>double BankAccount::getBalace()<br>{<br> return balance;<br>}<br><br>void BankAccount::deposit(double amount)<br>{<br> balance += amount;<br>}<br><br>void BankAccount::addInterest()<br>{<br> //calculate the interest on the balance. It is divided by 12 because rates<br> //are usually set in years and banks do the calculation once a month.<br> double interest = (interestRate / 12.0) * balance;<br> balance += interest;<br>}<br><br>void BankAccount::withdraw(double amount, WITHDRAWL_TYPE type)<br>{<br> /*<br> If the bank account will go below $0.00 if this amount is withdrawn then the<br> bank teller will warn them that they cannot take this amount away from the <br> account and not do it. If it doesn't go below $0.00 they will take it out<br> of the balance.<br> */<br> if (balance - amount < 0)<br> {<br> cout << "Bank Teller: balance cannot go below $0.00.";<br> cout << endl;<br> }<br> else<br> balance -= amount;<br>}<br><br>void BankAccount::monthlyUpdate()<br>{<br> addInterest();<br>}<br><br>void BankAccount::displayInformation()<br>{<br> cout << "Savings ACCT #" << accountNumber << ", " << getName() << " has a balance of $" << balance;<br> cout << endl;<br>}<br><br>/*<br> A checking account is similar to a savings account in that it holds money which can<br> be added to or taken away from. Unlike a savings account, which is used for long term<br> savings, money is constantly being added to it and taken ...

The full tutorial is about 1413 words long plus attachments.

Attachments:
main.cpp (10K) (Preview)
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty