- Correctly apply DeMorgan's theorem in the case of AND.
Your Task, Your Challenge
Write your code so that the robot lets you use the car when it is appropriate.
Use DeMorgan’s theorem to enable the robot to determine when it’s ok to let someone use the car based on the driver having their license and having obtained the key from the car rental agency.
There are 2 tests you can use to do this:
- keyOK() checks whether the driver has the car keys or not;
- licenseOK() checks whether the driver has his or her driver's license or not.
Time to get to work :O)
You must check every possible case to ensure that the robot correctly does or does not allow the car to be used.