Cosc1284 programming techniques assignment - robot write a


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

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Cosc1284 programming techniques assignment - robot write a
Reference No:- TGS02698435

Expected delivery within 24 Hours