lundi 30 août 2021

exercise on how a bank works with the ruby language [closed]

Bank

You must create a bank.

This bank must have customers

A customer must have an account

An account must have a balance

Customers must be able to transfer their balance to each other

Display an error message if the transfer is impossible

Display a success message if the transfer is successful

Scenario

Create a bank and two accounts in this bank

Create a customer A,B,C and D

Assign accounts to customers with balances of 0

Customer A makes a deposit of 100000

Customer B has a deposit of 25000

Customer C has a deposit of 30000

Customer D makes a deposit of 400000

Customer B makes a transfer of 50,000 to customer A

Customer A makes a transfer of 70000 to customer B

Display the balance of customer A

Display the balance of customer B

Display the total balance of the bank

Display the bank's customers with a balance higher than 100000

The bank takes 5% interest on all accounts

Display the balance of interest collected by the bank

The bank can give credits below 300000 to customers with a balance below 50000

Customer D tries to get a credit of 200000

Customer A is trying to get a credit of 400000

Customer C tries to get a credit of 150,000

Customer B makes a transfer of 100000 to customer D

Display the balance of all customers

Display the sum of all the credits granted to the customers

do you have an idea of how to proceed

Aucun commentaire:

Enregistrer un commentaire