Write a program to use a robot to move, Programming Languages

Write a program to use a robot to move the stack of blocks from a source location to a target location, based. Movement of robot arms, picking and dropping, can be controlled using the Robot class methods described below.

The Robot allows the following actions (methods): up(), down(), extend(), contract(), raise(), lower(), pick(), drop(),speedUp(), slowDown(). These are further described in the following descriptions.

• The height (h) of the main arm may be changed by 1 unit, using methods up() and down(). The height (h) of this arm is in the range 2 to 13, and is initially set to 2.

• The second arm may be moved horizontally by 1 unit using extend() or contract(). The width (w) is in the range 1 to 10, and is initially set to 1.

• The depth (d) of the third arm may be changed by 1 unit using lower() or raise(). The depth cannot be less than 0 but must be less than the height of the main arm ( d < h ). In the initial depth of the third arm is set to 0 (that is, the arm is not visible).

• The Robot class has two other methods, slowDown (int factor) and speedUp (int factor) to adjust the time between moves by the amount specified in factor.

• A block can be picked up from the top of the stack of blocks at the source, using pick().

• A block may be dropped at the top of the stack of blocks at one of the two target piles (one for even height blocks, one for odd height blocks) using drop(), depending on the height of the block.

The height of blocks can only be 1, 2, 3 or 4. Blocks of heights 1 and 3 must be dropped on the "odd" target pile in column 1, and blocks of heights 2 and 4 must be dropped on the "even" target pile in column 2.

Posted Date: 3/18/2013 1:26:41 AM | Location : United States

Related Discussions:- Write a program to use a robot to move, Assignment Help, Ask Question on Write a program to use a robot to move, Get Answer, Expert's Help, Write a program to use a robot to move Discussions

Write discussion on Write a program to use a robot to move
Your posts are moderated
Related Questions
A number of simple student records are written to a text file. The format of some typical linesshould be - Task (1): Using a text editor, create a file with 10 such reco

We will be assuming here that our roots are of the form, in this case, r 1,2 = l + mi If we take the first root we'll find the following solution. x l + m i It i

Detailed Description: • The program will take temperature readings as input from user for specified number of consecutive days. • Program will store these temperature values into

Explain the Goto Statement - Computer Programming? The goto statement is employed to alter the normal sequence of program execution by transferring control to some other part o

1.) Write a flowchart and program to do the following: A pressure sensor in a cooling system measures the pressure of the refrigerant and is connected to Port -1 of the 8051. If th

Pascal program: Exactly what you need to do to generate your empirical data is specific to your individual assignment. However, some rules apply to all of you: 1. The gener

Write an assembly program that computes Fibonacci numbers 2-5. a. Assume Fib(0)=0 and Fib(1)=1. b. Store Fib(2) in EAX, Fib(3) in EBX, Fib(4) in ECX and Fib(5) in EDX. c. Use a LOO

I need help with this question. The problem i''m having is that what''s the syntax for using dynamic memory allocation of objects of one class in the constructor of some other clas

While working in the eHealth Applied Research lab at Mohawk College, you are asked to transform an xml file into an XHTML representationusing XSLT for display in a browser.The xml

Question 1 Explain the history of Internet Question 2 What are the advantages of DHTML? Question 3 Explain the concept of DOM Question 4 How does AJAX work