Write a C++ program to get Fixed account details from the user and display the details using multilevel inheritance with the following classes

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
KINDLY SOLVE THE QUESTION AS SOON AS POSSIBLE . WITH MATCHING OUTPUT AND INPUT
-----------------------------------------------------------------------
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 AND OUTPUT SHOWN IN IMAGE BELOW
 

 

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, ACCO01,5456.45,500,10
Account Details:
AccountHolderName AccountNumber
Balance
MinimumBalance LockingPeriod
Tony
ACC001
5456.45
500.00
10
Transcribed Image Text: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, ACCO01,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 3 steps with 1 images

Blurred answer
Knowledge Booster
Operators
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education