5.We have car parking space, we want to create a status board which always shows the status of the parking status. So we have some kind of sensors to detect the car.
Write a program any programming language C++,JAVA,Or PHP which ask the event option for car IN, car OUT and Status. Follow the below instruction for action on each event.
1. Car IN - Assign a vacant place to the new car.(If there is no car space remaining then prompt message “No Space”)
2. Car OUT - Ask the Position of the car like 13 that means 3rd column of the 1st row. So now the position is vacant now.(If there is no car parked on the position which is entered then Prompt message “Already Vacant”).
3. Status - You have to print the below pattern.
0 1 2 3 4 5
0 * * * * * *
1 * 0 * * * *
2 * 0 * * * *
* - Filled 0 - Available.
Answers
Answered by
0
Answer:
sorry I didn't know the answer
Similar questions