d. Extras
Representing designs
5. What is a data dictionary and what is its purpose?
6. What is an object description and what is its purpose?
7. What is pseudocode and what is its purpose?
8. What is the difference between ← and = in pseudocode?
APPLY YOUR KNOWLEDGE
Pretend you are designing a simple banking transaction system. The program will handle operations such as deposit, withdrawal and check balance. Create pseudocode to represent each of the functional requirements described below.
Functional requirements
Display Menu:
→ Prompt the user to choose an operation: Deposit, Withdraw or Check Balance.
→ Based on the user's choice, perform the corresponding operation.
Deposit:
→ Ask the user for the amount to deposit (positive number).
→ Add the deposit amount to the balance.
→ Run the 'Display Menu' functional requirement.
Withdraw:
→ Ask the user for the amount to withdraw (positive number).
→ Check if the balance is sufficient for withdrawal.
→ If sufficient, deduct the amount from the balance.
→ If not sufficient, display an error message, "Not enough funds.".
→ Run the 'Display Menu' functional requirement.
Check Balance:
→ Display the current balance.
→ Run the 'Display Menu' functional requirement.