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

Assignment Help:

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.


Related Discussions:- Write a program to use a robot to move

Need help for crowdsporting website development, CrowdSporting Website Deve...

CrowdSporting Website Development I want an advanced web developer to spend 1-2 days coding our newly designed website. It will be a single page scrolling site, fully designed a

Explain inheritance and polymorphism in lingo programming, Question: (a...

Question: (a) Explain the concepts of Inheritance and Polymorphism in Lingo programming. (b) Write short descriptions on parent scripts and child objects in Lingo object

Java, how to save bulk entries at a time using collections?

how to save bulk entries at a time using collections?

#Linux, Hi Dehren, Below is the assessment question for the linux:  Task Y...

Hi Dehren, Below is the assessment question for the linux:  Task Your job in this assignment is to create two Virtual machines each running a different but the latest distribution

Laplace transforms, There actually isn't all that much to this section. All...

There actually isn't all that much to this section. All we are going to do now is work a quick illustration using Laplace transforms for a 3 rd order differential equation therefo

Define reasons for using functions, Define Reasons for using Functions? ...

Define Reasons for using Functions? 1. Evade rewriting the same code over and over. 2. It is simpler to write programs and keep track of what they are doing. Codes are able t

Ado. net, ADO. NET ADO.NET (ActiveX Information Things for .NET) is a set o...

ADO. NET ADO.NET (ActiveX Information Things for .NET) is a set of programs elements that developers can use to accessibility data and data solutions. It is an element of the platf

C++ programing, how to rewrite C++ program the DNAStrand class (DNA Project...

how to rewrite C++ program the DNAStrand class (DNA Project) to instead store the nucleotide sequence in a dynamically-allocated array?

Shell script for combinations ncr, Normal 0 false false fal...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd