Task 2 - Macro Bank updates its customer's accounts at the end of each month. The bank offers two types of accounts: savings and current. Every customer must maintain a minimum balance. If a customer's current balance falls below the minimum balance, there is a penalty of 7 OMR for savings account and 12 OMR for current accounts. If the balance at the end of the month is at least the minimum balance, the account receives interest as follows: 'savings' accounts receive 5% interest on current balance 'current' accounts with balances of up to 4000 OMR receive 2% interest on current balance; otherwise the interest 6% on current balance. Write and execute a C program using onlinegdp.com with descriptive comments explaining each line of code: 1. Reads an account number (int type), account type: s or S for savings, c or C for current, and minimum balance that the account number should maintain, and current balance (both of type float) of five customers. 2. The program must use switch-case construct for account types (Savings and Current). Each case will call relevant function, otherwise run the program again. 3. The functions will calculate final balance as per the conditions given above and return that amount back to the main function 4. All the data are saved in arrays (account number, account type, minimum balance, current balance and final balance) 5. Account data are retrieved from the arrays then shown in a table format as displayed in the Sample Output 1 below: 6. Test the program running it five times using the following input data samples and print the output (final balance) of each as given in Sample Output 2. Paste the code and output in the report. Sample Output 1: Account No: 1 Enter account number and account type (c or S): 123 s Enter account minimum balance: 1500 Enter current balance: 1493 The final balance is 1486.0 Account No: Enter account number and account type (C or S): 10055 c Enter account minimum balance: 3350 2 Enter current balance: 3338 The final balance is 3326.0 Sample Output 2: Acct No 123 Acct Type Min. Balance Acct Balance Final Balance 1500.0 1493.0 1486.0 55 334 C 3350.0 3338.0 3326.0 S 7450.0 7822.5 8213.6 21 C 2200.0 2244.0 2288.9 55 4500.0 4770.0 5056.2 C
Task 2 - Macro Bank updates its customer's accounts at the end of each month. The bank offers two types of accounts: savings and current. Every customer must maintain a minimum balance. If a customer's current balance falls below the minimum balance, there is a penalty of 7 OMR for savings account and 12 OMR for current accounts. If the balance at the end of the month is at least the minimum balance, the account receives interest as follows: 'savings' accounts receive 5% interest on current balance 'current' accounts with balances of up to 4000 OMR receive 2% interest on current balance; otherwise the interest 6% on current balance. Write and execute a C program using onlinegdp.com with descriptive comments explaining each line of code: 1. Reads an account number (int type), account type: s or S for savings, c or C for current, and minimum balance that the account number should maintain, and current balance (both of type float) of five customers. 2. The program must use switch-case construct for account types (Savings and Current). Each case will call relevant function, otherwise run the program again. 3. The functions will calculate final balance as per the conditions given above and return that amount back to the main function 4. All the data are saved in arrays (account number, account type, minimum balance, current balance and final balance) 5. Account data are retrieved from the arrays then shown in a table format as displayed in the Sample Output 1 below: 6. Test the program running it five times using the following input data samples and print the output (final balance) of each as given in Sample Output 2. Paste the code and output in the report. Sample Output 1: Account No: 1 Enter account number and account type (c or S): 123 s Enter account minimum balance: 1500 Enter current balance: 1493 The final balance is 1486.0 Account No: Enter account number and account type (C or S): 10055 c Enter account minimum balance: 3350 2 Enter current balance: 3338 The final balance is 3326.0 Sample Output 2: Acct No 123 Acct Type Min. Balance Acct Balance Final Balance 1500.0 1493.0 1486.0 55 334 C 3350.0 3338.0 3326.0 S 7450.0 7822.5 8213.6 21 C 2200.0 2244.0 2288.9 55 4500.0 4770.0 5056.2 C
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
Related questions
Question
Please I want solution of this on an urgent basis. Many Thanks
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 5 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
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
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