assuming the robot is placed on track at the


Assuming the robot is placed on track at the packing station facing away from the station) the robot traverses the entire track. During this step, the robot will follow a left-hand-on-wall strategy, i.e., at any junction, the robot rst attempts a left turn (L), and if that is not possible, it attempts to go straight (S), and if that is not possible, it attempt a right turn (R). If none of these conditions are encountered, it will perform a U turn (U). It is important to mention that, according to the rules set here, the robot never enters into any of those outlets inside the big loop. The robot traverses through the entire path once in the clockwise direction, while recording the sequence of turns in an array. Speci cally, at the junctions (when decisions have to be made) the program keeps record of the track in terms of left (L), right (R), straight (S), and U turns (U). Note that straight turns are recorded only at junctions. At the end of this step, a character array indicating the geometry of the track (eg \LRLULRLLR ..") will be generated. The track and the starting position of the robot is speci ed in an input text le provided as a command-line argument to the program.

Request for Solution File

Ask an Expert for Answer!!
Financial Accounting: assuming the robot is placed on track at the
Reference No:- TGS0415562

Expected delivery within 24 Hours