Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Write this in C program. You are supposed to implement a simple software that models an exaggeratedly small bank and its simple transactions and

Please Write this in C program.

You are supposed to implement a simple software that models an exaggeratedly small bank and its simple transactions and operations. The bank can keep track of some customers account in a database file. A customer is modeled by the following items: Customer Number (random 4 digit number given by the system at the time of creating) Customer Full Name (string with max length 20) Customer Date of Birth o It has Day, Month, Year (each one is an integer) Customer Address (string with max length 100) Customer Telephone number (string with max length 20) Customer Balance (a double number) Tellers are modeled as follows: Tellers Full Name (string with max length 20) Tellers User Name (string with max length 10) Tellers Password (string with max length 10) The information about Customers and Tellers are kept into two separated files customers.txt and tellers.txt. An example of tellers.txt file is given bellow: Albert Einstein, albert1879, qazedc789456 Jim Carrey, jimjim, 123mnbvcxz An example of customers.txt file is given below: 9654, Bill Gates, 28/10/1955, {1835 73rd Ave NE Medina WA 98039 Zillow}, +14258828080, 91000000000.00 1151, Shahin Mehdipour Ataee, 1/1/1983, {C2, Riverside, Catalkoy, Girne}, +905331234567, 500.00 The system works as below: After running the program, the system asks the user to login. A teller should enter his/her username and password to be able to log into the system. The system asks at most 3 times from the teller to enter correct username and password after, the 3rd unsuccessful try it stops asking and terminates. After successful logging in, the system shows a welcome message to the teller (exp. Welcome Albert Einstein!) Then the system asks the teller to choose a transaction option: 1. List customers summary Lists the summary of the customers information in a table on the screen. Customers number Customers name Customers balance 2. Add a new customer Asks the teller to enter data for a new customer. The customer number is chosen by the system randomly but it should not be already assigned to another customer. 3. Show specific customer information Ask the teller to enter either an account number or a name If the account number exist the system shows the full information of the customer If the name exist the system shows the list of all customers who their names matched with the key then the teller chooses one of them then the system shows the full information of the chosen customer 4. Delete specific customer The system only accepts customer number If it matches it asks for confirmation after the confirmation the system deletes all the information of the customer from the database file. 5. Deposit money to the customer account The system only accepts customer number If it matches the system asks the teller that how much should be deposited, and after the teller entered the value it updates the customers balance in the database file. 6. Withdraw money from the customer account The system only accepts customer number If it matches the system asks the teller that how much should be deposited, and after the teller entered the value it updates the customers balance in the database file. 7. Log out The system goodbyes the tellers and the program terminates.

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

Step: 3

blur-text-image

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions