Ask Java Expert


Home >> Java

Programming Techniques Assignment - Robot

Assignment Objective - The objective of this assignment is to develop your programming and problem solving skills in a step-by-step manner, assisted with visualization.

Visualization helps you to easily identify any problems with your algorithm.

What you need to do -

Write a program to move the stack of blocks from source to a specified target location.

Movement of Robot arms, picking and dropping are controlled using the Robot methods described below.

For all sections below you are required to complete the control() method of the RobotControl class shown below.

The control() method will be automatically called when the program is run. RobotControl class has a reference r set to refer to the Robot object.

Requirements -

Your solution must use Java 1.7 or above and be compatible with the environment supplied in the computer laboratories.

You should make sure that your solution includes examples of constants to represent fixed values in your program.

You should NOT use streams from Java 1.8. This assignment is geared at assessing your ability to work with developing an algorithm for working with arrays via the use of loops and if/else statements.

The specification for each task is set out below. Note these are cumulative so that a requirement set for Part C also includes the previous requirements from Parts A - B except where the new requirement contradicts the older one. This means that any code that your write for Part B should also complete the Part A scenario. Any code that your write for Part C must also successfully compete the scenarios in Parts A & B.

Part A: There are six bars are of height (7) and four blocks are of height (3).

Complete the control() method of the RobotControl class to move all the blocks to the respective targets as indicated in the screen shot below.

The target is determined by the height of the block being moved.

  • All blocks of size 3 must be placed on top of the bars.
  • Blocks of size 3 should be placed on top of the bars beginning with column 3.
  • Only one block can be placed on a bar, so after a block has been placed on column 3, then the next block should be place on column 4 etc.

Part B: There are six bars of varying height and there are four blocks height 3.

Complete the control() method of the RobotControl class to move all the blocks to the respective targets.

Allow the user to supply the heights of the 6 bars as command line arguments.

There are four blocks of height (3).

The target is determined by the height of the block being moved.

  • All blocks of size 3 must be placed on top of the bars.
  • Blocks of size 3 should be placed on top of the bars beginning with column 3.
  • Only one block can be placed on a bar, so after a block has been placed on column 3, then the next block should be place on column 4 etc.

Part C: There are six bars of varying height and the number of blocks as well as the heights of each block may vary.

Complete the control() method of the RobotControl class to move all the blocks to the respective targets.

Allow the user to supply the heights of the 6 bars as well as the number and height of the blocks as command line arguments.

Individual block heights may vary but must lie within the range of 1 - 3.

The total block heights must not exceed 12.

The target is determined by the height of the block being moved.

  • All blocks of size 1 must be placed in column 1 labelled Target 1
  • All blocks of size 2 must be placed in column 2 labelled Target 2
  • All blocks of size 3 must be placed on top of the bars.
  • Blocks of size 3 should be placed on top of the bars beginning with column 3.

Only one block can be placed on a bar, so after a block has been placed on column 3, then the next block of size 3 should be place on column 4 etc.

Assessment -

The assignment is designed to test multiple competencies required for successful software development. The assessment evaluates all skills required not just the code itself. You will be assessed on your ability to comply with requirements as set out in this document.

The assessment will include competencies in:

1. Business Requirements: such as adherence to a style guide, documentation of your program and compliance with processes such as submission of your work prior to assessment.

2. Java Programming: in Java demonstrating a mastery of the language and the accepted conventions for developing applications.

3. Software Development Lifecycle: practices such as an iterative approach to development that includes thorough testing of your solution.

4. Algorithm Development: that demonstrates that you have a clear idea of the logic required to complete the necessary tasks.

The algorithm should aim to be efficient. For example the blocks should be moved to their respective targets in the minimum number of moves.

Note: You are expected to use loops and nested loops to avoid repeating the code for moving each single block for all parts of the specification.

Attachment:- Assignment Files.rar

Java, Programming

  • Category:- Java
  • Reference No.:- M92741619
  • Price:- $75

Guranteed 36 Hours Delivery, In Price:- $75

Have any Question?


Related Questions in Java

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As