subject

This project is adapted from Programming project 5 on Page 520 of the textbook. We practice working on dynamic arrays to solve this problem. You run four computer labs. Each lab contains certain number of computer stations to be determined at runtime.
Your program should keep track of the status of each computer station, whether it's empty or used by some user. Whenever a user (identified by 5-digit ID number) logs in or logs off, the program updates its data, and displays the new status of the lab.
In addition to the login and logoff, your program also supports a search command that looks up whether a certain user is using any computer station or not.
Your program then needs to dynamically allocate space for the current labs array of arrays using the entry in labsizes that corresponds (same index) to the labs[index] for the size. Please start with the starter code as it controls the Menu and showLabs displays.
Please implement the following functions:
void createArrays(IntPtr labs[], int labsizes[]); // should dynamically allocate the arrays.
void freeArrays(IntPtr labs[]); // should free the arrays
void search(IntPtr labs[], int labsizes[]); // should search for the user in the lab
void logout(IntPtr labs[], int labsizes[]); // should logout the user from the lab
Don't forget to add a comment at the top of the function to explain what it does.

Example output
An example execution of the program is displayed below:
Welcome to the LabMonitorProgram!
Please enter the number of computer stations in each lab:
How many computers in Lab 1?4
How many computers in Lab 2?5
How many computers in Lab 3?6
How many computers in Lab 4?4
MAIN MENU
0) Quit
1) Simulate login
2) Simulate logout
3) Search
1
Enter the 5 digit ID number of the user logging in:
33333
Enter the lab number the user is logging in from (1-4):
3
Enter computer station number the user is logging in to (1-6):
3
LAB STATUS
Lab # Computer Stations
1 1: empty 2: empty 3: empty 4: empty
2 1: empty 2: empty 3: empty 4: empty 5: empty
3 1: empty 2: empty 3: 33333 4: empty 5: empty 6: empty
4 1: empty 2: empty 3: empty
MAIN MENU
0) Quit
1) Simulate login
2) Simulate logout
3) Search
1
Enter the 5 digit ID number of the user logging in:
22222
Enter the lab number the user is logging in from (1-4):
2
Enter computer station number the user is logging in to (1-5):
2
LAB STATUS
Lab # Computer Stations
1 1: empty 2: empty 3: empty 4: empty
2 1: empty 2: 22222 3: empty 4: empty 5: empty
3 1: empty 2: empty 3: 33333 4: empty 5: empty 6: empty
4 1: empty 2: empty 3: empty

MAIN MENU
0) Quit
1) Simulate login
2) Simulate logout
3) Search
3
Enter the 5 digit ID number of the user logging in:
22222
User 22222 logged in Lab 2 at computer 2

MAIN MENU
0) Quit
1) Simulate login
2) Simulate logout
3) Search
2
Enter the 5 digit ID number of the user logging in:
11111
User not logged in.
LAB STATUS
Lab # Computer Stations
1 1: empty 2: empty 3: empty 4: empty
2 1: empty 2: 22222 3: empty 4: empty 5: empty
3 1: empty 2: empty 3: 33333 4: empty 5: empty 6: empty
4 1: empty 2: empty 3: empty 4: empty

MAIN MENU
0) Quit
1) Simulate login
2) Simulate logout
3) Search
2
Enter the 5 digit ID number of the user logging in:
33333
Logout user 33333 in Lab 3 at computer 3
LAB STATUS
Lab # Computer Stations
1 1: empty 2: empty 3: empty 4: empty
2 1: empty 2: 22222 3: empty 4: empty 5: empty
3 1: empty 2: empty 3: empty 4: empty 5: empty 6: empty
4 1: empty 2: empty 3: empty 4: empty

MAIN MENU
0) Quit
1) Simulate login
2) Simulate logout
3) Search
0
Bye!

Hints

You should work on your program so that it's always compilable: i. e, work on one function at a time, implement it, test it and modify the function until it works. Only then, you move on to next one.
Write comments to 1) document your algorithms and design, 2) make your code reabable, 3) debug code.
Started code link https://onlinegdb. com/Ad6Hu4jgS . it was too long thats why i could not paste it

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
question
Computers and Technology, 24.06.2019 20:30
How is energy expended in active transport
Answers: 1
question
Computers and Technology, 25.06.2019 00:00
To remove text from a specific location and keep it to use again, you should select
Answers: 1
You know the right answer?
This project is adapted from Programming project 5 on Page 520 of the textbook. We practice working...
Questions
Questions on the website: 13722363