1) LCD initially shows Total Space= 5 & Empty Space=5
2) Car enters carpark & entry sensor senses car, LCD shows Total Space= 5 & Empty Space=4. After car enters the carpark, exit sensor will sense it & barrier will close.
3) This process will continue until all 5 cars are inside the carpark. When a 6th car tries to enter, LCD will display, ''sorry NO space available''.
4) The cars will then proceed to exit the carpark. Upon going out & the exit sensor sensing it, the barrier will open & LCD will display ''Total Space= 5 & Empty Space=1''. The barrier will the close when the sensor at the entry senses the car going out.
This process will continue untill all 5 cars have exit the carpark & the display will show the initial ''Total Space= 5 & Empty Space=5''