Assume that a bank maintains two kinds of accounts for customers: a savings account and the other as a current account. The savings account provides compound interest and withdrawal facilities but no cheque book facility. The current account provides a chequebook facility but no interest. Current account holders should also maintain a minimum balance, and if the balance falls below this level, a service charge is imposed. Create a class account that stores customers name, account number and type of account. From this derives the class cur_acct and sav_acct from making them more specific to their requirements. Include necessary constructors and member functions to achieve the following tasks: A menu should be displayed to the user to perform the following tasks. A. Accept deposit from a customer and update the balance. B. Display the balance. C. Compute and deposit interest. D. Permit withdrawal and update the balance. E. Check for the minimum balance, impose a penalty, necessary, and update the balance. Create two files, one for current account holders and the other for saving account holders, to store the data permanently. All the information regarding account holders should be stored in these files. When required to display information regarding an account holder, retrieve the information from the file and display it.
Assume that a bank maintains two kinds of accounts for customers: a savings account and the other as a current account. The savings account provides compound interest and withdrawal facilities but no cheque book facility. The current account provides a chequebook facility but no interest. Current account holders should also maintain a minimum balance, and if the balance falls below this level, a service charge is imposed. Create a class account that stores customers name, account number and type of account. From this derives the class cur_acct and sav_acct from making them more specific to their requirements. Include necessary constructors and member functions to achieve the following tasks: A menu should be displayed to the user to perform the following tasks. A. Accept deposit from a customer and update the balance. B. Display the balance. C. Compute and deposit interest. D. Permit withdrawal and update the balance. E. Check for the minimum balance, impose a penalty, necessary, and update the balance. Create two files, one for current account holders and the other for saving account holders, to store the data permanently. All the information regarding account holders should be stored in these files. When required to display information regarding an account holder, retrieve the information from the file and display it.
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 5PE: Using classes, design an online address book to keep track of the names, addresses, phone numbers,...
Related questions
Concept explainers
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 6 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning