Self-Service Course 4 Project - Kiva Robot Remote Control (Amazon_Technical_Academy.Self_Service_Courses.Course4.JavaProgrammingPostDuke.project.KivaRobotRemoteControl.WebHome) - XWiki Self-Service...

1 answer below »
Need someone that going to do it 100%


Self-Service Course 4 Project - Kiva Robot Remote Control (Amazon_Technical_Academy.Self_Service_Courses.Course4.JavaProgrammingPostDuke.project.KivaRobotRemoteControl.WebHome) - XWiki Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 1 of 26 10/4/2021, 7:23 AM Amazon Confidential The required code are written along with the samples provided. Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 2 of 26 10/4/2021, 7:23 AM Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 3 of 26 10/4/2021, 7:23 AM Self-Service Course 4 Project - Kiva Robot Remote Control Primary Owner amazon-tech-academy (POSIX) Last modified 4 months ago by bperciva. About Launch Engage Learn Hire Volunteer FAQs Contact Current Participants Internal We have provided this project as a way for you to get more familiar with the Course 4 Learning Material, to prepare you for the Technical Assessment, and to provide individuals interested in applying to After Hours Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 4 of 26 10/4/2021, 7:23 AM with an opportunity to demonstrate their coding experience. Project Overview Welcome to 2012! Ahem, I mean to the Kiva team! We are working on introducing robots into the Amazon Fulfillment Centers and have plans to one day even have them drive themselves! But let's not get ahead of ourselves... The Kiva robots are finished and they're incredible! They know how to move forward (F), turn left (L), turn right (R), take (T), and drop (D). What are they lifting and dropping? They are lifting and dropping pods filled with products and carrying them between the pod's storage location and a drop zone, where the Kiva robot remains, and a Fulfillment Center employee removes products from the pod to pack an order. We have created a program that prints out a map showing where the robot currently is, where the pod to pick up is, and where it needs to be dropped off. We need you to program a Kiva Robot Remote Control! Right now we've programmed the Remote Control to print out the map of the FC and then take in directions from the driver, but those directions aren't being sent to the robot. We need you to interpret the directions and send them to the robot. Kiva Robots are in- credibly expensive to make so you need to make sure they won't drive into any walls or obstacles when you make a move. P.S. We found this incredible video from the future showing “A Day in the Life of a Kiva Robot,” after they learned to drive themselves! https://www.youtube.com/watch?v=6KRjuuEVEZs . Before You Get Started Download and Open the Project 1. If you do not have BlueJ installed on your computer, please download it from Duke here . Download the appropriate version based on your operating system directly from that website. Don't download BlueJ directly from https://www.bluej.org/ because the version there will miss critical de- pendencies from Duke. 2. Open the KivaWorld downloads folder in workdocs. 3. Download the KivaWorld-##.zip file (for example, KivaWorld-01.zip, but may have a different num- ber in place of the "##") that you see 1. There should be a KivaWorld-##.zip file that contains the starter code -- download this one now 2. (There will also be a KivaWorldJavadoc-##.zip file that contains documentation about the ex- isting code -- more on this below in a "Documentation" section) 4. Double-click on the .zip file to expand the project contents. Feel free to move the KivaWorld folder to wherever you keep your projects on your computer. 5. Double-click on KivaWorld/package.bluej. (Note that this is just another way of opening a BlueJ project--besides opening BlueJ first and using the Project menu to find the project) 6. You should see the class that you'll be implementing, and can now run the code! http://www.youtube.com/watch?v=6KRjuuEVEZs http://www.bluej.org/ Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 5 of 26 10/4/2021, 7:23 AM How to Run and Test the Project Now that you've got the project open in BlueJ, let's run the code for the first time! Click “Compile” on the left side of the BlueJ project window: Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 6 of 26 10/4/2021, 7:23 AM Right click on the class and select “new RemoteControl()” to create a new instance: Choose a name for your new instance, for example, remoteControl, and hit OK. Right-click on the red instance in the lower portion of the BlueJ window and select “void run()” to ex- ecute 's run instance method: Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 7 of 26 10/4/2021, 7:23 AM The console should appear and you will get a at this point, which is expected. Don't worry, we'll get around to fixing that later! Now you're ready to get started! What is Already Present in the Project? The class is responsible for running the program, interacting with the user, and moving the Kiva robot. We have provided you this class with some starter code in it. It contains logic to interact with the console by printing out the map of the floor, and taking in the string of directions from the user. In addition to , the project will utilize some code that has already been written by the Warehouse Team. The Warehouse Team had already written this code, so they've packaged it up for our team to use. You will not need to make changes to any of these classes, but we wanted to explain how this Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 8 of 26 10/4/2021, 7:23 AM works so it doesn't seem like too much magic. These classes are tucked away inside a JAR (Java ARchive) file inside KivaWorld/+libs/. A JAR file is a convenient way to bundle a bunch of related Java classes (often called a library) into a single file that the JVM can access. (Optional: Here is a good intro on JARs , though a little more information than you need right now.) Here's a quick summary of the classes and enumerations provided by the Warehouse Team: : Represents a Kiva's environment, including pickup/dropoff points, obstacles and Kiva's starting location. It allows identifying what exists at any given location, as well as rendering the en- tire map as a String for display. : Represents the direction a robot is facing. There are four orientations, and each includes a “delta” point which moves the robot one space in that direction when added to the current location. : Represents what is located at any given location of the FloorMap. Optional: Taking a look inside the JAR Show Optional: How to open a terminal and cd to the project directory Show Starter Code Class Diagram We created a class diagram to visualize the classes provided by the Warehouse Team and the class. Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 9 of 26 10/4/2021, 7:23 AM Please select a map file P * Documentation We've also provided more complete documentation in the form of Javadocs, which are a collection of HTML files that document classes and their methods. 1. Open the KivaWorld downloads folder on Workdocs. 2. Download the KivaWorldJavadoc-##.zip file with the highest version number (the version should match the version of the KivaWorld-##.zip file you downloaded, let us know if this is not the case). 3. Double-click on index.html to load the javadoc viewer in your browser. 4. Refer to these pages throughout the project to see how the above classes behave. You can view the Javadocs for the classes you're writing and editing (e.g. ) as you build them, via the Tools → Project Documentation menu in BlueJ (if it asks you if you want to regenerate docu- mentation, click “Regenerate”). Sample Floor Map Files We have also provided you with three floor map files in the KivaWorld-##.zip that you downloaded. You can use these for testing purposes. sample_floor_map1.txt - a simple map with walls, but no obstacles. The K, P, and D are all in a straight line. sample_floor_map2.txt - a map with walls and obstacles sample_floor_map3.txt - a map with walls and obstacles Project Goals Your goal is to complete all of the project tasks, which will result in interacting with the user in the following way. Actions: Pop Out | Edit | ? Self-Service Course 4 Pro ject - Kiva Robot Remote Control (Amazon_T... https://w.amazon.com/bin/view/Amazon_Technical_Academy/Self_Serv... 10 of 10/4/2021, 7:23 AM Please select a map file - P * --- - |*| * K--- D - * * * * - Current Kiva Robot location: (2,4 Facing: UP Please enter the directions for the Kiva Robot to take LFFFFF I'm sorry. The Kiva Robot did not pick up the pod and then drop it off in the right place The user
Answered 1 days AfterOct 21, 2021

Answer To: Self-Service Course 4 Project - Kiva Robot Remote Control...

Swapnil answered on Oct 23 2021
125 Votes
94448/Kiva.java
94448/Kiva.java
import edu.duke.Point;
public class Kiva 
{
    FloorMap floor;
    Point kivaLocation;
    Point podLocation;
    Point dropZoneLocation;
    int podPickedUp;
    KivaCommand command;
    FacingDirection directionFacing;
FloorMapObject object;
    boolean isCarryingPod;
    boolean isSuccessfullyDropped;
    boolean isKivaOnFloor;
    public Kiva (FloorMap floor)
    {
        this.Kivaconstructor(floor, floor.getInitialKivaLocation());
        this.directionFacing  = FacingDirection.UP;
    }
    public Kiva (FloorMap floor, Point point)
    {
        this.Kivaconstructor(floor, point);
        this.directionFacing  = FacingDirection.UP;
    }
    private void Kivaconstructor(FloorMap floor, Point point)
    {
        this.floor = floor;
        this.kivaLocation = point;
        this.podLocation = floor.getPodLocation();
        this.dropZoneLocation = floor.getDropZoneLocation();
        this.isCarryingPod = false;
        this.isSuccessfullyDropped = false;
    }
    public FacingDirection getDirectionFacing()
    { 
        return this.directionFacing;
    }
    public Point getCurrentLocation()
    { 
        return this.kivaLocation;
    }
    private void dropPod()
    { 
        if(this.kivaLocation.getX() == this.dropZoneLocation.getX() && this.kivaLocation.getY() == this.dropZoneLocation.getY() && this.isCarryingPod == true)
        {
            this.isSuccessfullyDropped = true;
        }
        else
        {
            this.isSuccessfullyDropped = false;
        }
    }
    public boolean isSuccessfullyDropped()
    {
        return this.isSuccessfullyDropped;
    }
    private void takePod()
    {
        if(this.kivaLocation.getX() == this.podLocation.getX() && this.kivaLocation.getY() == this.podLocation.getY())
        {
            this.isCarryingPod = true;
            this.podPickedUp = 1;
        }
        else
        {
            this.isCarryingPod = false;
            throw new NoPodException("Can't take nonexistent pod from location " + this.kivaLocation);
        }
    }
    public boolean isCarryingPod()
    {
        return this.isCarryingPod;
    }
    private void moveForward()
    {
        int x;
        int y;
        if(this.directionFacing == FacingDirection.UP)
        {
            x = kivaLocation.getX();
            y = kivaLocation.getY() - 1;
            this.kivaLocation = new Point(x, y);
        }
        else if(this.directionFacing == FacingDirection.LEFT)
        {
            x = kivaLocation.getX() - 1;
            y = kivaLocation.getY();
            this.kivaLocation = new ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here