Question

Textbook help its not in textbook solutions from the textbook C++ Programming 7th edition Malik,D.S Chapter...

Textbook help its not in textbook solutions from the textbook C++ Programming 7th edition Malik,D.S Chapter 12 programming exercise 5

Banks offer various types of accounts, such as savings, checking, certificateof deposits, and money market, to attract customers as well as meet their specific needs. Two of the most commonly used accounts are savings andchecking. Each of these accounts has various options. For example, you mayhave a savings account that requires no minimum balance but has a lower interest rate. Similarly, you may have a checking account that limits thenumber of checks you may write. Another type of account that is used tosave money for the long term is certificate of deposit (CD).In this programming exercise, you use abstract classes and pure virtualfunctions 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 savingsaccounts: one that has no minimum balance and a lower interest rate andanother that requires a minimum balance and has a higher interest rate. Checking accounts: Suppose that the bank offers three types of checkingaccounts: one with a monthly service charge, limited check writing, nominimum 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, ahigher 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. Thenwe say that the CD will mature in six months. The penalty for earlywithdrawal is stiff.

Note that the class es bankAccount and checkingAccount areabstract. That is, we cannot instantiate objects of these classes. The other classes in Figure 12-25 are not abstract. bank ccount : 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 retrieveaccount owner’s name, account number, and account balance; make deposits;withdraw money; and create monthly statements. So include functions toimplement these operations. Some of these functions will be pure virtual. checking ccount A checking account is a bank account. Therefore, itinherits 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 virtualfunction writeCheck to write a check. serviceChargeChecking A service charge checking account is a checkingaccount. Therefore, it inherits all the properties of a checking account. For simplicity, assume that this type of account does not pay any interest, allows theaccount holder to write a limited number of checks each month, and does notrequire any minimum balance. Include appropriate named constants, instancevariables, and functions in this class. noServiceChargeChecking A checking account with no monthly servicecharge is a checking account. Therefore, it inherits all the properties of achecking account. Furthermore, this type of account pays interest, allows theaccount holder to write checks, and requires a minimum balance. highInterestChecking A checking account with high interest is a checkingaccount with no monthly service charge. Therefore, it inherits all the properties of a no service charge checking account. Furthermore, this type of account payshigher interest and requires a higher minimum balance than the no servicecharge checking account. savings ccount A savings account is a bank account. Therefore, it inheritsall the properties of a bank account. Furthermore, a savings account also paysinterest. highInterestSavings A high-interest savings account is a savings account.Therefore, it inherits all the properties of a savings account. It also requires aminimum balance. certificateOfDeposit A certificate of deposit account is a bank account.Therefore, it inherits all the properties of a bank account. In addition, it hasinstance variables to store the number of CD maturity months, interest rate, andthe current CD month. Write the definitions of the classes described in this programming exercise and aprogram to test your classes.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream.h>
#include<conio.h>
class Customer
{
int Account no;
public:
void getnumber()
{
cout<<"Enter Account No:";
cin>>rno;
}
void putnumber()
{
cout<<"\n\n\taccount No:"<<account no<<"\n";
}
};

class test:virtual public customer
{
  
public:
int part1,part2;
void getmarks()
{
cout<<"Enter saving account\n";
cout<<"Part1:";
cin>>part1;
cout<<"Part2:";
cin>>part2;
}
void putsaving account()
{
cout<<"\tMarks Obtained\n";
cout<<"\n\tPart1:"<<part1;
cout<<"\n\tPart2:"<<part2;
}
};

class sports:public virtual customer
{

public:
int accountbalance;
void getbalance()
{
cout<<"Enter Account banlance :";
cin>>score;
}
void putscore()
{
cout<<"\n\tAccount banlance is:"<<score;
}
};
class result:public test,public Account
{
int total;
public:
void display()
{
total=part1+part2+DC;
putnumber();
put bankaccount saving ();
put balance();
cout<<"\n\tTotal bank account balance:"<<total;
}
};

void main()
{
result obj;
clrscr();
obj.getaccountnumber();
obj.getbanlce ();
obj.getsdc();
obj.display();
getch();
}

Add a comment
Know the answer?
Add Answer to:
Textbook help its not in textbook solutions from the textbook C++ Programming 7th edition Malik,D.S Chapter...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • c++ help please. Savings accounts: Suppose that the bank offers two types of savings accounts: one...

    c++ help please. 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 but has a higher interest rate (the benefit here being larger growth in this type of account). 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...

  • C++ Banks offer various types of accounts, such as savings, checking, certificate of deposits, and money...

    C++ 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....

  • In this, you will create a bank account management system according to the following specifications: BankAccount...

    In this, you will create a bank account management system according to the following specifications: BankAccount Abstract Class contains the following constructors and functions: BankAccount(name, balance): a constructor that creates a new account with a name and starting balance. getBalance(): a function that returns the balance of a specific account. deposit(amount): abstract function to be implemented in both Checking and SavingAccount classes. withdraw(amount): abstract function to be implemented in both Checking and SavingAccount classes. messageTo Client (message): used to print...

  • This is in C++ (using IDE Visual Studio). I am seeking assistance ASAP. Please include a...

    This is in C++ (using IDE Visual Studio). I am seeking assistance ASAP. Please include a static member in the class to automatically assign account numbers (used to process up to 10 accounts) and have the user include their first and last name. Thank you! 13. a. Define the class bankAccount to store a bank customer's account number and balance. Suppose that account number is of type int, and balance is of type double. Your class should, at least, provide...

  • Project 9-2: Account Balance Calculator Create an application that calculates and displays the starting and ending...

    Project 9-2: Account Balance Calculator Create an application that calculates and displays the starting and ending monthly balances for a checking account and a savings account. --->Console Welcome to the Account application Starting Balances Checking: $1,000.00 Savings:  $1,000.00 Enter the transactions for the month Withdrawal or deposit? (w/d): w Checking or savings? (c/s): c Amount?: 500 Continue? (y/n): y Withdrawal or deposit? (w/d): d Checking or savings? (c/s): s Amount?: 200 Continue? (y/n): n Monthly Payments and Fees Checking fee:              $1.00 Savings...

  • the programing language is C++ TIC PEO. Design a generic class to hold the following information...

    the programing language is C++ TIC PEO. Design a generic class to hold the following information about a bank account! Balance Number of deposits this month Number of withdrawals Annual interest rate Monthly service charges The class should have the following member functions: Constructor: Accepts arguments for the balance and annual interest rate. deposit: A virtual function that accepts an argument for the amount of the deposit. The function should add the argument to the account balance. It should also...

  • C++ Design and implement a hierarchy inheritance system of banking, which includes Savings and Checking accounts...

    C++ Design and implement a hierarchy inheritance system of banking, which includes Savings and Checking accounts of a customer. Inheritance and virtual functions must be used and applied, otherwise, there is no credit. The following features must be incorporated: 1. The account must have an ID and customer’s full name and his/her social security number. 2. General types of banking transactions for both accounts, Checking and Savings: withdraw, deposit, calculate interest (based on the current balance, and if it was...

  • Q3

    A)Define the class bankAccount to store a bank customer's account number and balance .Suppose that account number is of type int m and balance is of type double . Your class should at least , provide the account number m retrive the balance , depositand withdraw money , and print account information. Add appropriate constructors.B) Every bank offers a checking account . Drive the class checkingAccount from the class bankAccount( design in part (a).This class inherits member to store theaccount...

  • C++ Simple code please Thank you in advance B. Write a C++ program as per the...

    C++ Simple code please Thank you in advance B. Write a C++ program as per the following specifications: a. Define the class BankAccount to store a bank customer's account number and balance. Suppose that account number is of type int, and balance is of type double. Your class should, at least, provide the following operations: set the account number, retrieve the account number, retrieve the balance, deposit and withdraw money, and print account information. Add appropriate constructors. b. Every bank...

  • Introduction Extend the inheritance hierarchy from the previous project by changing the classes to template classes....

    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...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT