Manipulate various types of accounts

Assignment Help C/C++ Programming
Reference no: EM13498637

Banks offer various types of accounts, such as savings, checking, certificate of deposits, and money market, to attract customers as well as meet their specific needs. Two of the most commonly used accounts are savings and checking. Each of these accounts has various options. For example, you may have a savings account that requires no minimum balance but has a lower interest rate. Similarly, you may have a checking account that limits the number of checks you may write. Another type of account that is used to save money for the long term is certificate of deposit (CD).

In this programming exercise, you use abstract classes and pure virtual functions to design classes to manipulate various types of accounts. For simplicity, assume that the bank offers three types of accounts: savings, checking, and certificate of deposit, as described next.

Savings accounts: Suppose that the bank offers two types of savings accounts: one that has no minimum balance and a lower interest rate and another that requires a minimum balance and has a higher interest rate. Checking accounts: Suppose that the bank offers three types of checking accounts: one with a monthly service charge, limited check writing, no minimum balance, and no interest; another with no monthly service charge, a minimum balance requirement, unlimited check writing and lower interest; and a third with no monthly service charge, a higher minimum requirement, a higher interest rate, and unlimited check writing. Certificate of deposit (CD): In an account of this type, money is left for some time, and these accounts draw higher interest rates than savings or checking accounts. Suppose that you purchase a CD for six months. Then we say that the CD will mature in six months. The penalty for early withdrawal is stiff.

This figure shows the inheritance hierarchy of these bank accounts.

415_Implement the basic properties of a bank account.png

Note that the classes bankAccount and checkingAccount are abstract. That is, we cannot instantiate objects of these classes. The other classes in Figure 12-22 are not abstract.

bankAccount: Every bank account has an account number, the name of the owner, and a balance. Therefore, instance variables such as name, accountNumber, and balance should be declared in the abstract class bankAccount. Some operations common to all types of accounts are retrieve account owner's name, account number, and account balance; make deposits; withdraw money; and create monthly statement. So include functions to implement these operations. Some of these functions will be pure virtual.

checkingAccount: A checking account is a bank account. Therefore, it inherits all the properties of a bank account. Because one of the objectives of a checking account is to be able to write checks, include the pure virtual function writeCheck to write a check.

serviceChargeChecking: A service charge checking account is a checking account. Therefore, it inherits all the properties of a checking account. For simplicity, assume that this type of account does not pay any interest, allows the account holder to write a limited number of checks each month, and does not require any minimum balance. Include appropriate named constants, instance variables, and functions in this class.

noServiceChargeChecking: A checking account with no monthly service charge is a checking account. Therefore, it inherits all the properties of a checking account. Furthermore, this type of account pays interest, allows the account holder to write checks, and requires a minimum balance.

highInterestChecking: A checking account with high interest is a checking account with no monthly service charge. Therefore, it inherits all the properties of a no service charge checking account. Furthermore, this type of account pays higher interest and requires a higher minimum balance than the no service charge checking account.

savingsAccount: A savings account is a bank account. Therefore, it inherits all the properties of a bank account. Furthermore, a savings account also pays interest.

highInterestSavings: A high-interest savings account is a savings account. Therefore, it inherits all the properties of a savings account. It also requires a minimum balance.

certificateOfDeposit: A certificate of deposit account is a bank account. Therefore, it inherits all the properties of a bank account. In addition, it has instance variables to store the number of CD maturity months, interest rate, and the current CD month. Write the definitions of the classes described in this programming exercise and a program to test your classes.

Reference no: EM13498637

Questions Cloud

Find the average power of energy consumption : A household pays $1850 per year for the supplied electricity. find the average power of energy consumption
Evaluate the volume of gaseous hydrogen produced : In an electrolysis experiment, 15.0 g of water are decomposed by means of an electrical current to form gaseous hydrogen and oxygen. Calculate the volume of gaseous hydrogen produced at 25 °C and 100 kPa.
Calculate the full cost per unit for each product : Calculate the full cost per unit for each product under traditional costing method, using direct labor hours as the basis for appointment.
Evaluate the number of moles of gaseous nitrogen : Calculate the number of moles of gaseous nitrogen contained in a sample of 227 mL of gas saturated with water vapour at 20 °C and 90.0 kPa.
Manipulate various types of accounts : Each of these accounts has various options. For example, you may have a savings account that requires no minimum balance but has a lower interest rate. Similarly, you may have a checking account that limits the number of checks you may write. Anot..
What is the magnitude of the force it will experience : A 10 microcoulomb charge is placed at the origin and a 20 microcoulomb charge is placed on the x-axis at x = 40 cm. what is the magnitude of the force it will experience
Explain the volume of pure hydrogen present in a sample : What's the volume of pure hydrogen present in a sample of 55.0 mL of gas saturated with water vapour at 27 °C, if the total pressure is 104.8 kPa?
Evaluate the density of concentrated sulfuric acid : A flask has a mass of 78.16g when empty and 593.56g when filled with water. When the same flask is filled with concentrated sulfuric acid, its mass is 1026.57g. Calculate the density of concentrated sulfuric acid.
Prompts the user to input the shipping cost per liter : Write a program that does the Prompts the user to input the dimensions (in feet) of the container (radius the container (radius of the base and the height)

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Computing value of the return statement

In the following code snippet, what is the value of the return statement for x = 4 and n = 4? int foo(int x, int n)

  The second argument to the function is the string

The function fnUserBinaryInputX has 2 input arguments, each is a string. The first string is the "prompt" string displayed to the user when asked to enter a string. The second argument to the function is the string to compare the user entered stri..

  That takes the time as six integer arguments

Write a C function seconds_since_jan1() that takes the time as six integer arguments (year, month, day, hour, minute, and second) and returns the number of seconds since the beginning of the year.

  Write a program that will be used to gather statistical data

Write a program that will be used to gather statistical data about the number of movies

  Preparing a high level language program

Describe the purpose of each step in preparing a high level language program for execution (editing, compiling, linking, and loading).  Include in your description the types of files created with each of the first three steps.?

  Write a c++ program to grade multiple-choice

Write a C++ program to grade multiple-choice, including True/False, questions for an exam given in a class. A class may have one or more sections.

  Data from the file grocery.dat

Read the data from the file Grocery.dat and assign values to the 10  GroceryItem  objects. Next display these items to allow a customer to select grocery items from the list and indicate the quantity of that item he or she would like to order. When t..

  Write a recursive function that takes a string as parameter

Write a recursive function that takes a string as a parameter and prints its reversal in the same function in c++

  Write a very basic doubly-linked list

CptS 122 Lab #2: Linked Lists ,  Along with vectors, linked lists are one of the fundamental data structures in computer science. Unlike vectors, which store information in a contiguous block of computer memory, linked lists have the potential to sto..

  Use object oriented design to create a program to shuffle

Use object oriented design to create a program to shuffle and deal a deck of cards. Deal two, five card hands.

  Write a program that will input letters grade(a,b,c,d,f)

Write a program that will input letters grade(A,B,C,D,F), the number of which is input by the user (a maximum of 50 grades). The grades will be read into array. A function will be called five times(once for each letter grade) and will return the tota..

  Write a c++ statement that multiplies the value

Write a program that prompts the user to input a decimal number and outputs the number rounded to the nearest integer.

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