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

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 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:Type or paste question here

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 3 rd 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.

please solve this Project using this Template:

C:\Users\shahin.mehdipour\Documents\Visual Studio 2013\Projects\CS\Fibonacci\Fibonacci\Fibonacci.cpp 1

#include

#include

#include

//Declare Customer structure

//Declare Teller structure

//Declare an array of 10 Customers

//Declare the following functions:

//int Authentication();

//void WelcomeCustomer(...);

//int AskUserChoice();

//int ListCustomers(...);

//int AddNewCustomer(...);

//void ShowCustomer(...);

//int DeleteCustomer(...);

//int DepositMoney(...);

//int WithdrawMoney(...);

//void GoodbyeCustomer(...);

int main()

{

char LoginFullName[21];

// Call Authentication() function

// In case of successful login go ahead otherwise terminate

// Call WelcomeCustomer with LoginFullName.

// Call AskUserChoice()

int choice = 0;

while (1)

{

choice = AskUserChoice();

switch (choice)

{

case 1:

// Call ListCustomers(...) function

break;

case 2:

// Call AddNewCustomer(...) function

break;

case 3:

// Call ShowCustomer(...) function

break;

case 4:

// Call DeleteCustomer(...) function

break;

C:\Users\shahin.mehdipour\Documents\Visual Studio 2013\Projects\CS\Fibonacci\Fibonacci\Fibonacci.cpp 2

case 5:

// Call DepositMoney(...) function

break;

case 6:

// Call WithdrawMoney(...) function

break;

case 7:

// Call GoodbyeCustomer(...) function

break;

}

}

return 0;

}

int Authentication()

{

int tries = 1;

do

{

// Ask the user about his/her username and password

// Put them into two strings

// Through a FILE pointer open the tellers.txt file

int found = 0;

while (!feof())

{

// In this loop read from the file and extract the saved

// fullnames, usernames, and passwords (keep the fullname in

// the declared LoginFullName variable) and compare

// them (only username and password) with the input strings.

// If a match occured change found to 1 and break the loop. }

// Close the file.

if (found == 1) return 1;

tries++;

}

while (tries <= 3); return 0;

}

int AskUserChoice()

{

int choice = 0;

do{

// Show the options list

// 1. List customer's summary

// 2. Add a new customer

// 3. Show specific customer information

// 4. Delete specific customer

// 5. Deposit money to the customer account

// 6. Withdraw money from the customer account

// 7. Log out

// Ask the user choice and put it in the choice variable

}

while (choice is not between 1 and 7);

return choice;

}

//put function definitions here

//void WelcomeCustomer(...)

//{

C:\Users\shahin.mehdipour\Documents\Visual Studio 2013\Projects\CS\Fibonacci\Fibonacci\Fibonacci.cpp 3

//}

//int ListCustomers(...);

//{

//}

//int AddNewCustomer(...);

//{

//}

//void ShowCustomer(...);

//{

//}

//int DeleteCustomer(...);

//{

//}

//int DepositMoney(...);

//{

//}

//int WithdrawMoney(...);

//{

//}

//void GoodbyeCustomer(...);

//{

//}

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

Please make it fast 1 3 1 .

Answered: 1 week ago

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago

Question

4. Make recommendations on steps to take to melt the glass ceiling.

Answered: 1 week ago

Question

1. Discuss the potential legal issues that relate to training.

Answered: 1 week ago