Menu

[solved]-Write Program Keeps Track Cars Located Parking Garage Estimate Time Retrieve Car Garage Fu Q39066474

Write a program that keeps track of where cars are located in aparking garage to estimate the time to retrieve a car when thegarage is full. This program will demonstrate the following: How tocreate a list for use as a stack, How to enter and change data in astack. Solving the Problem Step 1 In Python, the stack datastructure is actually implemented using the list data structurewith a few additional functions. These functions come as part ofthe list structure, so it is really more about how to access thelist to make it function like a stack rather than it actually beinga different data structure from the list. Step 2 To add cars to thestack, use the append method of the list structure like you wouldwith any normal list. Step 3 To find how long it will take toretrieve a certain car, you will have to use the pop() function ofthe list until you find the required vehicle in the garage stackand count the number of vehicles. Step 4 Once the number of cars infront of the vehicle are found, the time taken to retrieve the carcan be calculated based on the average time it takes to move avehicle plus the time to retrieve the car. Step 5 Finally, theestimated time to retrieve the vehicle can be output to the user toinform the car owner. Documentation Guidelines: Use goodprogramming style (e.g., indentation for readability) and documenteach of your program parts with the following items (the itemsshown between the ‘<‘ and ‘>’ angle brackets are onlyplaceholders. You should replace the placeholders and the commentsbetween them with your specific information). Your cover sheetshould have some of the same information, but what follows shouldbe at the top of each program’s sheet of source code. Some lines ofcode should have an explanation of what is to be accomplished, thiswill allow someone supporting your code years later to comprehendyour purpose. Be brief and to the point. Start your design bywriting comment lines of pseudocode. Once that is complete, beginadding executable lines. Finally run and test your program.

Expert Answer


Answer to Write a program that keeps track of where cars are located in a parking garage to estimate the time to retrieve a car wh… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *