Knowee
Questions
Features
Study Tools

When a customer using an ATM (cash machine) enters their PIN number incorrectly three times, the card is not returned to the customer. This security procedure can be written into the software by a programmer using selection and iteration.Explain how selection and iteration are used in the ATM system described.[4]

Question

When a customer using an ATM (cash machine) enters their PIN number incorrectly three times, the card is not returned to the customer. This security procedure can be written into the software by a programmer using selection and iteration.Explain how selection and iteration are used in the ATM system described.[4]

🧐 Not the exact question you are looking for?Go ask a question

Solution

Selection and iteration are two fundamental concepts in programming that can be used to implement the ATM system described.

  1. Selection: This is used to make decisions in the code. In the context of the ATM system, when a customer enters their PIN, the system needs to check if the entered PIN matches the correct one. This is done using a selection statement, often an "if" statement. If the entered PIN is correct, the customer can proceed. If it's incorrect, the system needs to respond accordingly.

  2. Iteration: This is used to perform a certain action repeatedly. In the context of the ATM system, after the customer enters an incorrect PIN, the system needs to allow the customer to try again. This is done using an iteration statement, often a "for" or "while" loop. The system can be programmed to allow the customer to enter their PIN up to three times. If the customer enters the wrong PIN three times, the iteration would end, and the card would not be returned.

So, in summary, selection is used to check the correctness of the entered PIN, and iteration is used to allow the customer multiple attempts to enter their PIN correctly.

This problem has been solved

Similar Questions

A thief steals an ATM card and must randomly guess the correct five-digit pin code from a 6-key keypad. Repetition of digits is allowed.The number of possible codes is (Type an integer or fraction. Simplify your answer.)The probability that the correct code is given on the first try is (Type an integer or fraction. Simplify your answer.)

You are required to prepare the sequence diagram for withdrawing the money from the ATM for the following sequence of the events: The customer is able to make withdrawal of Money from the Bank ATM. The system employs the standard procedure for withdrawal of money by validating the card and account holder password. Assume that the main objects in this case are Customer and ATM.

Looking at the difference between user requirements and system specifications in the ATM example, we know that swiping the card and prompting for a PIN are requirements, while reading the card details and a 4-digit PIN are specifications.1 pointTrue.False.

Design a logic circuit for an ATM system. The ATM has three options: print a statement, withdraw money, or deposit money. The ATM will charge a $1 fee to: ● Withdraw money ● Print a statement without depositing money / Withdraw money ‘1’, ● Print statement w/o depositing money ‘1’ ● State of the ATM is ‘1’ when it charges $1.

Question 2Looking at the difference between user requirements and system specifications in the ATM example, we know that swiping the card and prompting for a PIN are requirements, while reading the card details and a 4-digit PIN are specifications.1 pointTrue.False.

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.