We read your photo as:
Describe the process for transferring and withdrawing money, including any fees and balance checks.
ScanSolve AI Answer
Here are the answers for Question Four:
a) To Transfer Money:
To transfer money, the system should perform the following checks and actions:
- Prompt the user to enter the recipient's phone number, the transfer amount, and their personal identification number (PIN).
- Verify if the entered PIN matches the user's
my_pin. - Calculate the total amount to be deducted, which is the
transfer_amountplus a 5% service fee. - Check if the
current_balanceis greater than or equal to theTotal Deduction. - If all conditions are met, deduct the
Total Deductionfrom thecurrent_balanceand confirm the transfer. Otherwise, display an error message (e.g., "Invalid PIN" or "Insufficient Balance").
b) To Withdraw Money:
To withdraw money, the system should perform the following checks and actions:
- Prompt the user to enter the withdrawal amount and their PIN.
- Verify if the entered PIN matches the user's
my_pin. - Calculate the total amount to be deducted, which is the
withdrawal_amountplus a 5% service fee. - Check if the
current_balanceis strictly greater than theTotal Deduction. - If all conditions are met, deduct the
Total Deductionfrom thecurrent_balanceand confirm the withdrawal. Otherwise, display an error message (e.g., "Invalid PIN" or "Insufficient Balance").
c) To Deposit Money:
To deposit money, the system should perform the following checks and actions:
- Prompt the user to enter the deposit amount.
- Check if the
deposit_amountis greater than 500. - If the condition is met, add the
deposit_amountto thecurrent_balance. - Confirm the deposit. Otherwise, display an error message (e.g., "Deposit amount must be greater than 500").
d) To Check Account Balance:
To check the account balance, the system should perform the following checks and actions:
- Prompt the user to enter their PIN.
- Verify if the entered PIN matches the user's
my_pin. - If the PIN is valid, display the
current_balance. Otherwise, display an error message (e.g., "Invalid PIN").
e) Three Chances for PIN:
The system should implement a counter for incorrect PIN attempts.
- Initialize a variable, for example,
pin_attempts, to 0. - Whenever a PIN is required (for transfer, withdrawal, or balance check), allow the user up to three attempts to enter the correct PIN.
- If an incorrect PIN is entered, increment
pin_attempts. - If
pin_attemptsreaches 3, the account should be locked, preventing further transactions until it is unlocked by an administrator or a recovery process. - If the correct PIN is entered within three attempts, reset
pin_attemptsto 0 and proceed with the requested transaction.
Still stuck on this one?
Ask a follow-up, and the answer starts from this question.
More Computer Science Questions

Handwritten Step-by-Step Solution
Get this as a handwritten image on WhatsApp — like a tutor wrote it for you.
Try on WhatsApp