
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
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](https://content.bartleby.com/qna-images/question/1eb96dc3-a882-4f82-8ba3-9352f1b102f4/c1f378c1-78d1-48d6-8cd1-7182fce1e7e6/547kox_thumbnail.png)
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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps with 1 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.Similar questions
- Question 1: Write a C/C++ program in which a parent forks a child, and the child forks a grandchild. The grandchild writes: “My process id is X, my parent's id is Y, and my Grandparent's id is Z' (where X, Y, and Z are the process ids). The program should produce no other output.arrow_forwardDifferentiate between a Run Time Error and Syntax Error. Also give suitable examples of each in c++arrow_forwardWrite C++ program to currency exchange, which is the process that allows customers to exchange one currency for another. The program will include decision-making statements, loops, arrays, file I/O, string, and functions. You should follow the details: As you might know, currency rates are influenced by several factors such a country'seconomic performance. Thus, it is better to get the up-to-date currency rates from anexternal source as it is easier to update. You should read the data from the file “ExchangeRate.txt”. “ExchangeRate.txt” file contains: 1.00 SAR 0.08 KWD 1.00 SAR 0.97 QAR 1.00 SAR 0.98 AED 1.00 SAR 0.10 BHD 1.00 SAR 0.10 OMR 1.00 QAR 0.08 KWD 1.00 QAR 1.01 AED 1.00 QAR 0.10 BHD 1.00 QAR 0.11 OMR 1.00 KWD 12.00 AED 1.00 KWD 1.23 BHD 1.00 KWD 1.26 OMR 1.00 AED 0.10 BHD 1.00 AED 0.10 OMR 1.00 BHD 1.02 OMR The program should print the available currencies for exchange which are:o SAR --> Saudi Arabia Riyalo KWD --> Kuwaiti Dinaro QAR --> Qatar Riyalo AED -->…arrow_forward
- c++arrow_forwardYou will get practice in this assignment in the following areas in C/C++:• Writing a simple C++ program• Compiling and linking• Logical expressions• Simple arithmetic and/or assignment statements• Standard Input and output• Variable Declaration• Simple If statements• Simple while statement• Declaring constants and variables• Good programming practices Programming Specifications:1. Your program must produce the minimal bill and coin count.2. Your program must accept values between 1 and 1,000,000 pennies. If a number is entered outside that range your program should continue to ask for a valid number.3. No Global Variables BUT your program must use global constants.4. You must use declared constants in your program and not literal values.5. Only print out non-zero values.. So, if there are no Five’s ….then don’t print zero fives. Design Considerations/Algorithms To see if you need to issue 100 dollar bills you divide the amount of pennies by the number of pennies in a 100 dollar bill.…arrow_forwardc++ Please help me, thank you so much.arrow_forward
- Which of the following are advantages of inline function declarations in C++ or the "Pragma Priority (x)" in Ada? they do not save push/pop variable overhead on the stack when it is called there is a lookup time required at runtime which is the same as an external function call during compile tim. Please type answer no write by hend.arrow_forwardA code for the detection and correction of errors was implemented using the Hamming method, this code was made in c ++. Make the code in Matlab, in such a way that the c ++ code is a base, to be able to develop the algorithm or the error detection and correction program using the Hamming method. The algorithm made in c ++ is shown below so that you can develop it in matlab. #include <stdio.h> #include <math.h> int main() { int a[20], b[20], c[20], d[20], i, k, m, f, n, j, r, p, x, y, z, ch, key, q, v, sum = 0; system("clear"); printf("\n Ingresa la longitud de la palabra de datos :"); scanf("%d", &k); printf("\n Ingresa la palabra de datos: \n"); for (i = 1; i <= k; i++) { scanf("%d", &a[i]); } m = 1; while ((k + m + 1) >= pow(2, m)) { m++; } printf("\n El valor de m es : %d", m); n = k + m; j = 1; r…arrow_forwardExplain what could happen by declaring all variables globally instead of using a combination of local and global variables in C++. Think in terms of complexity, proneness to errors, memory usage, etcarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education