Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

modify to meet the following requirements: All customer data is saved in a binary file. You will write six functions for the following six items.

 modify to meet the following requirements: All customer data is saved in a binary file. You will write six functions for the following six items. (Please refer to Lab- Extra Credit-fig. 11.15) 1) You will create a menu with six options for a bank customer service department (see below) to do the following tasks: (10 points) Bank IVC Customer Service Menu 1. 2. 3. 4. 5. 6. Add new customer account Update any existing customer Delete a customer account Create a formatted text file for all customers Display a list of customers with Certificate of Deposit amount & term Exit from the program Option#1-you will.be entering at least 5 customers with all the required information into the program and store the data onto a file in binary format. (10 points) Option#2-you will search any existing customer to update the information. (10 pts) Option#3-delete one customer record you created earlier. (10 points) Option#4-create a formatted customer text file. (10 points) Option#5-you will read the data from the file and display a list of Customer information (sort last name in alphabetical order) with grand total Amount of initial Certificate of Deposit and future amount. (10 points) 2) 3) 4) 6)


This is the provided source code:

#include #include #include #define size 3

struct acct { int num; char f_name[15]; char l_name[15]; float amount; float rate; int term; float future_amt; } bank[size], temp;

int main() {

int i, j; //int find; //float amt; float sum=0.0; /* load information in to bank */ for (i=0; i=> printf(\"Enter id: \"); scanf(\"%d\", &bank[i].num); printf(\"Enter first name: \"); fflush(stdin); gets(bank[i].f_name); printf(\"Enter last name: \"); fflush(stdin); gets(bank[i].l_name); printf(\"Enter amount to deposit: \"); scanf(\"%f\", &bank[i].amount);

/* instead of scanf scanf(\"%f\", &amt); bank[i].amount = amt; */

//assign an interest rate to calculate based on certain amount if (bank[i].amount > 10000) bank[i].rate=.02; else if (bank[i].amount > 5000) bank[i].rate=.015; else bank[i].rate=.005; /*enter term of saving with error checking*/ do{ printf(\"Enter term (year) to save: \"); scanf(\"%d\", &bank[i].term); }while (bank[i].term

//calculate future amount bank[i].future_amt=bank[i].amount; for(j=1;j bank[i].future_amt +=bank[i].future_amt*bank[i].rate *bank[i].term; }//for

//Calculate the all customer deposit amount for the bank for (i=0; i sum+= bank[i].amount; printf(\" The total customer deposit in the bank is %.2f\", sum);

}//main




Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing An International Approach

Authors: Wally J. Smieliauskas, Kathryn Bewley

6th edition

978-0070968295, 9781259087462, 978-0071051415

More Books

Students also viewed these Programming questions