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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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