Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Little Man Computer program that allows a user to input a PIN code in order to deactivate an Electro - Magnetic Door Lock

Create a Little Man Computer program that allows a user to input a PIN code in order to
deactivate an Electro-Magnetic Door Lock (EM Lock).
Program Requirements:
Users are allowed up to three (3) attempts to enter the correct PIN code.
The PIN code to deactivate the lock is set as "501".
Output Specifications:
If the user inputs the correct PIN code, the program should output the value
'1'.
If the user inputs an incorrect PIN code, the program should output the value
'9', indicating that the user has another opportunity to enter the correct PIN
code.
If after three (3) attempts, the PIN code entered is still incorrect, the program
should output the value '-1' to signal that no further attempts are allowed and
the alarm will be activated.
Run your program using LMC simulator which can be downloaded online.
After testing your program, compare and comment on the results to evaluate the
functionality and user interaction of your PIN entry system.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

explain what is meant by experiential learning

Answered: 1 week ago

Question

identify the main ways in which you learn

Answered: 1 week ago