Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In function A5Q9 you are in control of a Rover on Mars. See figure 1 below. In the window, there is a map of the

In function A5Q9 you are in control of a Rover on Mars. See figure 1 below. In the window, there is a map of the area. In the top right hand corner, there is the landing point of your rover. In the bottom right there is a red square indicating the return stage of your rover. You need to get the robot there. Blue squares represent solid rocks which are impossible to cross. Green squares represent spaces that are easy to move forwards via the robot.forward() method. Yellow squares represent sand which you can pass through only by digging (use robot.dig()). You cannot dig through green spaces only move forward through them. Your robot can also turn left 90 degrees or right 90 degrees via robot.turnLeft() and robot.turnRight() methods. Your job is to navigate your robot across the Martian landscape from the start to the end. This should be a series of turns, forwards or digs. Orange square represent scientific targets. Get to all of them for an extra two marks. NASA insist you are in control all the time so you cannot try to invent any self-driving rovers (zero marks). NOTE everyone gets their own different landscape. The landscape is setup from your studentName so your Name&ID *must* be set in Assessment5.setup() before you attempt to start navigating. While unique, each landscape is checked to be navigable, so the question is always doable, even if you can't see it. You are permitted to use loops to automate repetitive moving, digging or turning etc. Lost or confused? Try printing the map and then drawing a route before you try coding it. Or you could go and visit the The Space Zone exhibition at Life Science Centre and try it for real.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Prepare an electronic rsum.

Answered: 1 week ago

Question

Strengthen your personal presence.

Answered: 1 week ago

Question

Identify the steps to follow in preparing an oral presentation.

Answered: 1 week ago