: Implement the following given scenario in C++ a. Create an inheritance hierarchy by writing the source code, containing base class BankAccount and derived classes SavingsAccount and CheckingAccount that inherit from class BankAccount. b. Implement Polymorphism where required to achieve the polymorphic behavior. c. Multiple constructors be defined for initializing the account of a user. d. The class should provide four member functions. i. Member function Credit should add an amount to the current balance. ii. Member function Debit should withdraw money from the Account and ensure that the debit amount does not exceed the Account's balance. If it does, the balance should be left unchanged and the function should print the message "Debit amount exceeded account balance." iii. Member function getBalance should return the current balance. iv. Define a friend function ‘get_account_info()’ which will allow user to check account details of a particular account holder. e. Derived class SavingsAccount should inherit the functionality of an Account, but also include a data member of type double indicating the yearly interest rate (percentage) assigned to the Account. SavingsAccount's constructor should receive the initial balance, as well as an initial value for the SavingsAccount's interest rate. (Make sure to call the base class constructor appropriately.) SavingsAccount should provide a public member function calculateInterest that returns a double indicating the amount of interest earned by an account. Member function calculateInterest should take one integer argument indicating the number of years gone by, and should determine the interest amount by the formula I = B *(1+ r)t , where I is the interest, B is the initial balance, r is the interest rate, and t is the number of years gone by. [Note: SavingsAccount should inherit member functions credit and debit as is without redefining them.] f. Derived class CheckingAccount should inherit from base class Account and include an additional data member of type double that represents the fee charged per transaction. CheckingAccount's constructor should receive the initial balance, as well as a parameter indicating a fee amount. g. Create 2 object of savings account with different amounts and then overlaod ‘+’ operator to add their current balance and display total balance from the two accounts. h. Use Exception handling in the main/demo class which will validate the withdrawal transaction on a particular class. The creation of objects of the base and derived classes may be kept in the try block to prevent a creation of the base/abstract class object, or assignment of a base class object to a derived class reference.
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
In C++ Create an inheritance hierarchy that a bank might use to represent customers’ bank accounts. All customers at this bank can deposit (i.e., credit) money into their accounts and withdraw (i.e., debit) money from their accounts. More specific types of accounts also exist. Savings accounts, for instance, earn interest on the money they hold. Checking accounts, on the other hand, charge a fee per transaction (i.e., credit or debit). Create an inheritance hierarchy containing base class Account and derived...
For this week's assignment , please create an application following directions in the attached document.(windows form application) Create a base class named Account and derived classes named SavingsAccount and CheckingAccount that inherit from class Account. Base class Account should include one private instance variable of type decimal to represent the account balance. The class should provide a constructor that receives an initial balance and uses it to initialize the instance variable with a public property. The property should validate the...
Please show it in C++. Thank you!
Problem Definition Create an inheritance hierarchy containing base class Account and derived class Savings-Account. Base class Account should include one data member of type double to represent the account balance. The class should provide a constructor that receives an initial baiance and uses it to initialize the data member. The class should provide three member functions. Member function credit should add an amount to the current balance. Member function debit should withdraw money...
Introduction Extend the inheritance hierarchy from the previous project by changing the classes to template classes. Do not worry about rounding in classes that are instantiated as integer classes, you may just use the default rounding. You will add an additional data member, method, and bank account type that inherits SavingsAc-count ("CD", or certicate of deposit). Deliverables A driver program (driver.cpp) An implementation of Account class (account.h) An implementation of SavingsAccount (savingsaccount.h) An implementation of CheckingAccount (checkingaccount.h) An implementation of...
Create an Inheritance hierarchy that a bank may use to represent customer's bank accounts (Checking and Savings), this includes a GUI user interface that allows user to login, and deposit or withdraw, and application to display the transaction and final balance. All the bank customers can: - Create a new account - Deposit (Credit) money into their account and/or withdraw (debit) money from their account. - Application should expect user to login to their account using login/password Create necessary classes...
MAIN OBJECTIVE Develop a polymorphic banking program using the Account hierarchy created (below). C++ Capture an output. polymorphism. Write an application that creates a vector of Account pointers to two SavingsAccount and two CheckingAccountobjects. For each Account in the vector, allow the user to specify an amount of money to withdraw from the Account using member function debit and an amount of money to deposit into the Account using member function credit. As you process each Account, determine its...
C++ Help. PLEASE include detailed comments and explanations. PLEASE follow the drections exactly. Thank you. Define a class with the name BankAccount and the following members: Data Members: accountBalance: balance held in the account interestRate: annual interest rate. accountID: unique 3 digit account number assigned to each BankAccount object. Use a static data member to generate this unique account number for each BankAccount count: A static data member to track the count of the number of BankAccount objects created. Member...
Should be in C#
Create an inheritance hierarchy that a bank might use to
represent customers’ bank accounts. All customers at this back can
deposit (i.e. credit) money into their accounts and withdraw (i.e.
debit) money from their accounts. More specific types of accounts
also exist. Savings accounts, for instance, earn interest on the
money they hold. Checking accounts, on the other hand, charge a fee
per transaction.
Create base class Account and derived classes SavingsAccount and
CheckingAccount that inherit...
Now create another class named SavingsAccount. This should be a subclass of BankAccount. A SavingsAccount should have an interest rate that is specified in its constructor. Furthermore, there should be a method, addInterest, that deposits interest into account, based on the account balance and interest rate. Create another subclass of BankAccount named CheckingAccount. A CheckingAccount should keep track of the number of transactions made (deposits and withdrawals). Name this field transactionCount. Also, the set fee for transactions is three dollars,...
TASK 1 Create a new class called CheckingAccount that extends BankAccount. It should contain a static constant FEE that represents the cost of clearing onecheck. Set it equal to 15 cents. Write a constructor that takes a name and an initial amount as parameters. Itshould call the constructor for the superclass. It should initializeaccountNumber to be the current value in accountNumber concatenatedwith -10 (All checking accounts at this bank are identified by the extension -10). There can be only one...