Cosc1073 programming - you must reproduce this behaviour


PART A Specification - Robot Simulation

PART A Requirements

To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build upon to create the full solution.

NOTE: The primary requirements specifications are the supplied videos which show the EXACT behaviour you should reproduce.

However, some points worth noting about the displayed behaviour:

INITIALISATION:

After the init() method is called with valid array parameters:

- Blocks are placed in order (bottom to top) from the supplied (hard coded) blockHeights array, into the far right source column (column 10) (Control.SRC_COLUMN).
- Bars are placed in order from the supplied (hard coded) barHeights array from left to right (from Control.FIRST_BAR_COLUMN to a maximum of Control.LAST_BAR_COLUMN).
- This initialisation is done AUTOMATICALLY by the supplied RobotImpl.jar

BLOCK PLACMENT:

You must reproduce this behaviour by calling methods on the Robot. Further hints are given in the section HOW TO PROCEED below.

- Blocks are picked from the source column from top to bottom until there are no blocks remaining. You will need to control the robot movement to do this.
- Blocks are dropped (placed) as follows:
Yellow (Size 1) blocks are placed on the top of column 1 (Dest 1). Red (Size 2) blocks are placed on the top of column 2 (Dest 2).
Blue (Size 3) blocks are placed on top of bars starting at the left most bar (Control.FIRST_BAR_COLUMN) and progressing to the right most bar (Control.LAST_BAR_COLUMN).
- Blocks are lowered to the drop position using the raise()/lower() methods to move Arm3.
- If less bars than columns are supplied, blocks can still be placed on the empty column and should still be laid out as described above from Control.FIRST_BAR_COLUMN to Control.LAST_BAR_COLUMN

HEIGHT OPTIMISATION (ARM1 movement):

Again, you must reproduce this behaviour by calling appropriate methods on the Robot.

- Arm 2 (the horizontal arm controlled by extend()/contract()) should always be at the lowest height to clear any obstacles (i.e. the top of any column). This is achieved by using the up()/down() methods on Arm1.
- This is set before moving to make a pick (or after any drop) so that the arm can JUST clear any obstacles as it moves to the source column.
- The height is then rechecked as soon as you make a pick taking into account the picked block and the additional clearance it needs as it moves to the drop destination.

Code Quality Assessment

As well as functional correctness (robot behaviour matches video requirements) you will also be assessed based on the following code quality requirements:

- Use meaningful / descriptive identifiers (eg variable and method names).
- Demonstrate understanding of local variables versus class attributes and prefer local scope where possible.
- Demonstrate the use of defined constants in Control.java (Rather than using
magic numbers)
- Avoid code repetition. (THIS IS THE MOST IMPORTANT ONE!)
- Write small private methods to avoid code other than one or more method calls going in the RobotControl.control() method.
- Appropriate use of comments (but remember that easily understandable code is better than a comment).
- Include a comment at the top of RobotControl.java class stating your name and student number.

Attachment:- Assignment part.rar

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Cosc1073 programming - you must reproduce this behaviour
Reference No:- TGS02919781

Expected delivery within 24 Hours