6. Age Checking Machine

Home › Forums › QA first cases › 6. Age Checking Machine

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #178
    SimeonPortfolio
    Keymaster

    As a QA engineer you often will be assigned to check if certain business logic is correct. Your company develops a special machine (hardware + software), designed to be put at the entrance of a bar, where people come for a drink. The machine should check the age of people when they try to enter and tell them, if they are allowed to walk in.

    You are assigned to test the machine, which reads the personal ID card, extracts the age of the person from it (integer number), and displays appropriate message to each visitor, based on the age. The machine opens the door when the person is allowed to enter the bar.

    By design the machine should implement the following logic:

    Check visitor’s age and print appropriate message

    1. If age > 0, and age < 18, then print “You are too young to visit our bar“. The door stays closed.
    2.   If age > 18, then print “Welcome to our bar. Enjoy!” and the door opens.
    3.   Otherwise, print “Invalid age. Please try again“.

    Do you find any issues in the above logic?

    What is the mistake (error) in the above logic?

    How do we call the situation when we have a wrong logic in the code? Name it.

    What will be the result, if we run the code, which implements the wrong logic?

     

     

     

    #183
    SimeonPortfolio
    Keymaster

    What is the mistake (error) in the above logic? – There isn`t a equal = 18.

    How do we call the situation when we have a wrong logic in the code? Name it. – Bug

    What will be the result, if we run the code, which implements the wrong logic? – The machine will not allow people who are at 18. We will lost clients. 

     

    #197
    SimeonPortfolio
    Keymaster

    Test if the machine can recognize false ot fake ID. 

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
X