assume all the obstacles are of height 4 units


Assume all the obstacles are of height 4 units and the blocks are of heights 1 (bottom), 2 (top), 1 and 2 (top) units respectively.  Complete the control() method of the RobotControl class to move all the blocks to the respective targets.  

Sample call:  java Robot

Allow the user to supply the heights of the 6 obstacles via command line arguments, where the heights of the bars may vary from 1 to 8.  Complete the control() method of the RobotControl class to move all the blocks to their respective target locations.

Sample:   java Robot 786483. Based on these arguments, int array  barHeights[] will be automatically set, as in: barHeights[0] = 7; barHeights[1] = 8;  ....  barHeights[5] = 3;

Allow the user to supply the heights of the 6 obstacles as well as the heights of the blocks (which may vary in number) via command line arguments. Complete the control() method of the RobotControl class to move all the blocks to their respective targets.

Sample:   java Robot  786483 13241. Based on these arguments int arrays  barHeights[], blockHeights[] will be automatically set, as in .

   barHeights[0] = 7; barHeights[1] = 8;  ....  barHeights[5] = 3;

   blockHeights[0] = 1; blockHeights[1] = 3; ... blockHeights[3] = 1;

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: assume all the obstacles are of height 4 units
Reference No:- TGS0211861

Expected delivery within 24 Hours