Create a demo program that lets you manage a single account

Assignment Help Computer Engineering
Reference no: EM132158145

Use the following class declaration -

class BankAccount{private: string name; double balance; public: BankAccount(); BankAccount(string n, double b); double getBalance(); bool deposit(double amt); bool withdraw(double amt); void showAccountInfo();};

In main() create a demonstration program that lets you manage a single Bank Account. Asimple loop that defines and uses a bank account object with a simple menu is adequate.A.

DepositB. WithdrawalC. Show Account InfoQ. Quit Your deposit and withdraw member functions should include basic validation (depositand withdraw amounts should be greater than zero, and withdraw amount should be lessthan or equal to the balance). The recommended class function implementation for this isto return TRUE if the transaction is valid, and FALSE if it's not. For example thefollowing code in main would make sense -

if (deposit(amount)) cout<<"Success"<<endl; cout<<"New Balance is "<< getBalance()<<endl;else cout<<"Invalid Transaction"<<endl;
Notes: You should have two constructors - a default constructor that sets the name to‘John Doe', and the balance to 100 dollars, and an overloaded constructor that permitsname and balance to be set.

For full credit please submit your assignment in three files -main.cpp, BankAccount.cpp, and BankAccount.h. The only member function that shouldutilize cout is showAccountInfo. You are welcome to create additional functions in mainif you like (i.e. showMenu(), etc.).

Reference no: EM132158145

Questions Cloud

Outside of a cell is at equilibrium : When the solute concentration inside and outside of a cell is at equilibrium, the solute concentration inside in the cell is the same as outside the cell
Mitochondria and chloroplasts of eukaryotic cells : Biologists are almost all agreed that the mitochondria and chloroplasts of eukaryotic cells arose through the process of endosymbiosis.
What type of regular expressions does grep support : What type of regular expressions does grep support? (BRE, ERE, or both)
How does the volvocine line of green algae show possible : How does the Volvocine line of green algae show possible steps in the evolution of cell communication and tissue formation
Create a demo program that lets you manage a single account : Asimple loop that defines and uses a bank account object with a simple menu is adequate.A.
What are the differences between meiosis i and meiosis ii : What are the differences between Meiosis I and Meiosis II? How are they similar?
Difference between rna and mrna and sequencing bases : What is the difference between RNA and mRNA and their sequencing bases?
Define biological success among animals : Discuss and defend the attributes you would use to define biological success among animals. Are humans a biological success by these standards? Why?
Create a table that list their various features for on-board : Create a table that lists their various features for on-boarding, off-boarding, configuration, quarantine, modification of device settings, etc.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Which gpo policy takes precedence in case of policy coflict

Which GPO policy takes precedence in the case of a policy conflict? Why? What is the value of the Group Policy in an enterprise environment?

  What was the strategy used in the case

What improvements could you offer as an IT leader managing the strategy for the situation covered by the case?

  Identify shadow are b a scene illuminated by a distant point

Set up an algorithm. h used on one of the visible-surface dt le( non methods, that %% di identify shadow are.b 11 a scene illuminated by a distant point source.

  Create variables and arrays to store data

Create variables and arrays to store data. Create parameterized functions or methods to store data. Create file readers that pull in parameters from files.

  Develop a test program that triggers a change

Develop a test program that triggers a change in the statistics above, report them on standard output - Replace the second-chance LRU approximation algorithm in both the active and inactive lists with a counter-based clock algorithm.

  How to calculate and display the total retail value

A mail order house sells five different products whose retail prices are: product 1 - $150, product 2 - $250, product 3 - $500, product 4 - $300, and product 5 - $350.

  Write a complete cpp program that reads two whole numbers

Write a complete C++ program that reads two whole numbers into two variables of type int and then outputs both the whole number part and the remainder.

  Determine whether he or she has won or lost

If the player rolls a total of 7 or 11 in the first round, the player wins. If the player rolls a total of 2, 3, or 12 in the first round, the player loses.

  Distinguish between traditional asp and provider of software

Distinguish between a traditional ASP and a provider of software as a service. What are the pros and CMS of each solution approach?

  How user interfacev design can be improved

Are uml diagrams adequate in representing aspects of user interfaces?

  Design an algorithm to divide this group into n teams

Suppose you have a set of N project managers and 2N software engineers. Each project manager is only willing to work with certain software engineers.

  For which values of n does insertion sort beat merge sort

Suppose we are comparing implementations of insertion sort and merge sort on the same machine. For which values of n does insertion sort beat merge sort?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd