Write a C++ program to get Fixed account details from the user and display the details using multilevel inheritance with the following classes.   Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.   Consider a class Account with the following protected member variables. Datatype Variable String accountHolderName String accountNumber double balance   Consider a derived class SavingAccount derived from Account class with the following protected member variable. Datatype Variable double minimumBalance   Consider a derived class FixedAcocunt derived from SavingAccount class with the following private member variable, Data type Member Name Integer  lockingPeriod   Include the following member function in FixedAcocunt class Member Function Description void display() This function is used to display the Account details. Print the string "Account Details:" in the method itself.  Use "%-20s %-20s %-20s %-20s %s\n" to print the table header "AccountHolderName","AccountNumber","Balance","MinimumBalance","LockingPeriod" and to display the details in the order.   Consider a class AccountBO with the following public member function, Member Function Description FixedAccount accountDetails(string details) The method accepts all the detail as a parameter, split the detail and store it in fixedAccount type object and returns that object.   In the main method, the detail of the FixedAccount is obtained from the user as a comma-separated value. Split the details by calling the accountDetails method and create an object for FixedAccount and display the details in the specified format.   Input  format: The account detail should be given in the CSV format [accountHolderName,accountNumber,balance,minimumBalance,lockingPeriod] Output format: The output consists of fixed account detail.  Use "%-20s %-20s %-20.2f %-20.2f %d\n" this format to print the detail. Refer sample Input and output for formatting specifications. [All text in bold corresponds to input and the rest corresponds to output] Sample Input and Output: Enter account details Tony,ACC001,5456.45,500,10 Account Details: AccountHolderName      AccountNumber         Balance          MinimumBalance    LockingPeriod         Tony                              ACC001                     5456.45           500.00                     10

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 29SA
icon
Related questions
Question
100%
Write a C++ program to get Fixed account details from the user and display the details using multilevel inheritance with the following classes.
 

Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.
 

Consider a class Account with the following protected member variables.
Datatype Variable
String accountHolderName
String accountNumber
double balance
 
Consider a derived class SavingAccount derived from Account class with the following protected member variable.
Datatype Variable
double minimumBalance
 
Consider a derived class FixedAcocunt derived from SavingAccount class with the following private member variable,
Data type Member Name
Integer  lockingPeriod
 
Include the following member function in FixedAcocunt class
Member Function Description
void display() This function is used to display the Account details.
Print the string "Account Details:" in the method itself. 
Use "%-20s %-20s %-20s %-20s %s\n" to print the table header
"AccountHolderName","AccountNumber","Balance","MinimumBalance","LockingPeriod"
and to display the details in the order.
 
Consider a class AccountBO with the following public member function,
Member Function Description
FixedAccount accountDetails(string details) The method accepts all the detail as a parameter,
split the detail and store it in fixedAccount type object and returns that object.
 
In the main method, the detail of the FixedAccount is obtained from the user as a comma-separated value.
Split the details by calling the accountDetails method and create an object for FixedAccount and display the details in the specified format.
 
Input  format:
The account detail should be given in the CSV format [accountHolderName,accountNumber,balance,minimumBalance,lockingPeriod]

Output format:
The output consists of fixed account detail. 
Use "%-20s %-20s %-20.2f %-20.2f %d\n" this format to print the detail.
Refer sample Input and output for formatting specifications.

[All text in bold corresponds to input and the rest corresponds to output]
Sample Input and Output:

Enter account details
Tony,ACC001,5456.45,500,10


Account Details:
AccountHolderName      AccountNumber         Balance          MinimumBalance    LockingPeriod
        Tony                              ACC001                     5456.45           500.00                     10
 

 



 
 
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
ADT and 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
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr