Question
Jan Villaroel
Topic: Computer Science Posted 1 year ago
Consider the software program that runs the operations of an ATM. From the workings of (i.e., your external interaction with) the ATM, you can logically deduce certain conclusions

Consider the software program that runs the operations of an ATM. From the workings of (i.e., your external interaction with) the ATM, you can logically deduce certain conclusions about the internal workings of this program. Give an example from this software program for each of the following control structures:

• a. sequence
• b. selection
• c. repetition


Answers
What are best answers and total votes?
No Votes
Vote
SignIn to Vote
Koala Tutor
Sep 28, 2023
Koala Ai Support

a. Sequence: One example of sequence in an ATM software program is the order of steps that need to be followed when inserting a debit card. The program first prompts the user to insert their card, then it reads the card information, verifies the card, and finally prompts the user to enter their PIN.

b. Selection: An example of selection in an ATM software program is when the user enters their PIN. The program checks if the entered PIN matches the stored PIN, and if it does, it proceeds to the next step (e.g., prompting the user to select an operation like withdrawal or balance inquiry). If the entered PIN is incorrect, the program may display an error message or lock the card.

c. Repetition: Repetition can be seen in an ATM software program when the user is allowed to perform multiple transactions in a single session. For example, after completing a transaction, the program may ask the user if they want to perform another operation. If the user chooses to continue, the program goes back to the beginning or a specific menu, allowing the user to perform another transaction. This process continues until the user chooses to end the session.

Koala Tutor Got a question with my answer?
Message Me