Suppose you are creating a system for bank accounts i.e. Current account and savings account. Create a class called account that will be used to represent customer’s bank account.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question
Suppose you are creating a system for bank accounts i.e. Current account and savings account. Create a class called account that will be used to represent customer’s bank account. Account class should only store the basic information for a customer (Name=string, email=string, account_no=int). Inherit two classes from this base class account which will be the type of account a customer can have. Inherit a class current_account which will have balance (float). The second class to inherit is savings_account which will have balance (float), and saving_percentage (float). Write following functions in classes:Constructor/DestructorDeep Copy Constructor
 
Parameterized constructorGetter/Setter for account information, and balance.Function to write the account information to a data file in append modeWrite a main function to create dynamic array of current and savings account.Also write a function to display all the users’ information having balance less than 100 in savings account.
Expert Solution
steps

Step by step

Solved in 6 steps with 1 images

Blurred answer
Knowledge Booster
Class
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,