Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 10 Weeks Ago, 6 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Write an algorithm, using pseudocode, to make the object do the following. Do not attempt if you do not know what you're doing. Do not copy and paste an answer. The general idea of the assignment is done. Look at CIS 120 Project, you just need to add to it.
1. You should have several functons. You have The oneif The roboT is aT a wall, buT you should have a functonfor walking To a wall, Turning around, walking back ToThe chair, and si±ng down. ²hese only require a 3-4lines each.2. Make sure To include The word "sTop" if a functonresulTs in The roboT si±ng back down.Algorithm:Start:totalNoSteps = 0stand upwallFound =Falsewhile(!wallFound):if (it senses a wall))step forwardturn around 90 degreewalk back to the chairsit down in its original starTng posiTonwallFound =±RUEelse:raise armslower armstotalNoSteps = totalNoSteps + 1
Course Project Instructions===========================A robot is sitting in a chair with its arms facing down.Write an algorithm, using pseudocode, to make the robot:stand upwalk forward until it senses a wallturn aroundwalk back to the chairsit down in its original starting positionFinally, output the total number of steps taken.Commands‐‐‐‐‐‐‐‐In addition to our standard pseudocode commands,you must also use the following robot control commands:sitstandstep (one step forward)raise arms (parallel to floor)lower arms (pointing to floor)sense (only if arms are raised)turn (90 degrees right)Immediately after issuing a sense command,you can check whether the robot is at the wall as follows:if at wallor alternativelyif not at wallAssumptions‐‐‐‐‐‐‐‐‐‐‐You must assume the following facts:The robot's initial sitting position is directly facing the target wall.There are no obstacles between the robot and the wall.The wall is 1 or more exact steps from the chair.The wall is sensed when it is less than 1 step from the robot's arms.The length of the robot's arms are slightly less than the length of 1 step.Your solution‐‐‐‐‐‐‐‐‐‐‐‐‐Your solution must include all of the following:
Attachments:-----------