Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMP104 Project (Fall 2019-2020) Project Title: The Tiny Bank Description: You are supposed to implement a simple software that models an exaggeratedly small bank and

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

COMP104 Project (Fall 2019-2020) Project Title: The Tiny Bank Description: 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 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: Teller's Full Name (string with maxlength 20) Teller's User Name (string with max length 10) Teller's Password (string with maxlength 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, qazdc789456 Jim Carrey. Jinjin, 123nbvcx An example of customers.txt file is given below: oss, Gates, 28/30/3256.126 Marduercia a 2011. , .22 1151, Shahin Mehdipour atau, in Riverside, Cataley, Game, +2567, 0. 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 3 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 customer's 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 customer's balance in the database file. 7. Log out The system goodbyes the tellers and the program terminates. C:\Users shahin shdpour Documental Studio 2011 Projects CS5lbonacci Sboracci Sbonacci.cpe included. include include time.to 1/Declare Customer structure 1/Declare Teller structure /Declare array of 10 Customers Declare the following functions: Int Authentication); vald welcome Customers...) Mint AkuChocol); Mint Listcustoms. Mint Accustom...) vald Show Customer..) Irint Delete Customer (...) Ist Depository...) Irint withdrawnyl...); Ivald Goodye Customer (...): int min) 1 char LoginFINam 22; 1/ Call Authentication) function 1/ In case of successful sagin go ahead otherwise terminate // Call welcomeCustomer with Loginflam.. 1/ Call AskerChoice) Int chalce; while (1) { choice AskerChale). watch (chal.ca 1 case 1: 1/ Call Last Customers...) function break; case 2: 1/ Call Add Customer(...) function Case 3: 1/ Call Show customer..) function 1/ Call Delet Customer(...) function C:\Users shahin shdpour Documental Studio 2011 Projects CS5lbonacci Sboracci Sbonacci.cpe 1/ Call Depository...) Nunction break; 1/ Call withdrawny... Tunction case 7: 1/ Call Goodbye Customer..) Nution bra > return } int Authentication) int tries - 1; de 1/ Ask the user about his/her username and password 1/ Put them into the strings // Through a FILE pointer en the tellers.txt file int found; while (feat // In this loop read from the file and extract the saved // fullnames, warnames, and password keep the fullnamese // the declared Lognbulvardable and compare // the only warsame and award) with the input strings. 1 If a match occured change found to 1 and break the Loop 1. Che these if (round - 3) return; while (tries c 1); return; } int sur Chee) Int choice; Show the options list III. List customer's sur 1. Add w customer 1 1. Show specific customer information 14. Delete specific customer 11 5. Deposit money to the customer account 11 4. withdra sony from the customer account 1 1. Logout 1 Ask the user choice and put it in the choice variable > while (choice is not between 1 and 7); return chece 1 //put function definition here Iveld Welcome Customer (...) IH C:\Uural shahin.modapour Documental Studio 2011 Projects csibonacci Sboracelsbonacci.co list List Customers...); IH Irint dicustomer(...) IH /vald Shato...) IM! 1/ Irint DelateCustom ...); IH 1/ Irint Depository...) 1/ Irint with sony...) IH HE /vald Body Customer (... IH COMP104 Project (Fall 2019-2020) Project Title: The Tiny Bank Description: 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 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: Teller's Full Name (string with maxlength 20) Teller's User Name (string with max length 10) Teller's Password (string with maxlength 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, qazdc789456 Jim Carrey. Jinjin, 123nbvcx An example of customers.txt file is given below: oss, Gates, 28/30/3256.126 Marduercia a 2011. , .22 1151, Shahin Mehdipour atau, in Riverside, Cataley, Game, +2567, 0. 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 3 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 customer's 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 customer's balance in the database file. 7. Log out The system goodbyes the tellers and the program terminates. C:\Users shahin shdpour Documental Studio 2011 Projects CS5lbonacci Sboracci Sbonacci.cpe included. include include time.to 1/Declare Customer structure 1/Declare Teller structure /Declare array of 10 Customers Declare the following functions: Int Authentication); vald welcome Customers...) Mint AkuChocol); Mint Listcustoms. Mint Accustom...) vald Show Customer..) Irint Delete Customer (...) Ist Depository...) Irint withdrawnyl...); Ivald Goodye Customer (...): int min) 1 char LoginFINam 22; 1/ Call Authentication) function 1/ In case of successful sagin go ahead otherwise terminate // Call welcomeCustomer with Loginflam.. 1/ Call AskerChoice) Int chalce; while (1) { choice AskerChale). watch (chal.ca 1 case 1: 1/ Call Last Customers...) function break; case 2: 1/ Call Add Customer(...) function Case 3: 1/ Call Show customer..) function 1/ Call Delet Customer(...) function C:\Users shahin shdpour Documental Studio 2011 Projects CS5lbonacci Sboracci Sbonacci.cpe 1/ Call Depository...) Nunction break; 1/ Call withdrawny... Tunction case 7: 1/ Call Goodbye Customer..) Nution bra > return } int Authentication) int tries - 1; de 1/ Ask the user about his/her username and password 1/ Put them into the strings // Through a FILE pointer en the tellers.txt file int found; while (feat // In this loop read from the file and extract the saved // fullnames, warnames, and password keep the fullnamese // the declared Lognbulvardable and compare // the only warsame and award) with the input strings. 1 If a match occured change found to 1 and break the Loop 1. Che these if (round - 3) return; while (tries c 1); return; } int sur Chee) Int choice; Show the options list III. List customer's sur 1. Add w customer 1 1. Show specific customer information 14. Delete specific customer 11 5. Deposit money to the customer account 11 4. withdra sony from the customer account 1 1. Logout 1 Ask the user choice and put it in the choice variable > while (choice is not between 1 and 7); return chece 1 //put function definition here Iveld Welcome Customer (...) IH C:\Uural shahin.modapour Documental Studio 2011 Projects csibonacci Sboracelsbonacci.co list List Customers...); IH Irint dicustomer(...) IH /vald Shato...) IM! 1/ Irint DelateCustom ...); IH 1/ Irint Depository...) 1/ Irint with sony...) IH HE /vald Body Customer (... IH

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

Database Systems For Advanced Applications 27th International Conference Dasfaa 2022 Virtual Event April 11 14 2022 Proceedings Part 2 Lncs 13246

Authors: Arnab Bhattacharya ,Janice Lee Mong Li ,Divyakant Agrawal ,P. Krishna Reddy ,Mukesh Mohania ,Anirban Mondal ,Vikram Goyal ,Rage Uday Kiran

1st Edition

3031001257, 978-3031001253

More Books

Students also viewed these Databases questions