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

Assignment help, Write your own version of the strcmp function string_compa...

Write your own version of the strcmp function string_compare. Supply a main program that will test each of the 3 differing outcomes. int string_compare(char *s, char *t); retu

Write a recursive function to generate anagrams, An anagram is a type of wo...

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta,

Project , You get a contract to implement a simple Java application that pr...

You get a contract to implement a simple Java application that process NBA team roster : your application has to read the NBA team roster from a text file and then print each playe

How to write a kernel module, Overview You will write a loadable kernel...

Overview You will write a loadable kernel module. If you have an idea which you can convince me is a good idea that can not be done as a module, but only via direct modificatio

Explain the comma operator- computer programming, Explain the Comma Operato...

Explain the Comma Operator- Computer Programming? The comma has two utilization and the most common use is as a parameter separator for data types and function parameter lists. H

Computes the least squares fit of the data, Your solution to the problem sh...

Your solution to the problem should be housed within a while loop, which allows the grader to test your solution repeatedly without having to re-execute the script, as shown in cla

What is hiding a method? explain, Question 1 Explain the three traits of O...

Question 1 Explain the three traits of Object Oriented Programming Question 2 Write a note on (a) Assignment Operators                             b) Bitwise Operators.

Java exception handling, Expertsmind brings you unique solution in java as...

Expertsmind brings you unique solution in java assignments Exception Handling An exception is an issue that appears during the performance of an application. An exception

Calculate the appropriate weight for each query term, 1-Create ir3.py based...

1-Create ir3.py based on ir2.py 2-Repeatedly prompt the user for a query (if they enter "q", then quit) 3-Find the terms in the query, and calculate the appropriate weight fo

Information management system, Write a detailed description on how you woul...

Write a detailed description on how you would go about planning information system for an organisation

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