Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Example Board: Example Command: Objective: Write a program that simulates a robot running a queue of commands to move around a board with obstacles. The

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Example Board:

image text in transcribed

Example Command:

image text in transcribed

Objective: Write a program that simulates a robot running a queue of commands to move around a board with obstacles. The board is composed of spaces that are either empty("") or have an obstacle ("X"). Also the board is assumed to be 10x10 spaces. The robot ("O") has an x and y position corresponding to its location on the board, and four commands: move up, move down, move left, and move right. Both the board and the robot's commands are assumed to be read in via a file (you can make your own format). Assume the robot starts in the top left corner of the board. The robot and an obstacle cannot exist in the same space, and if that happens the robot will "crash", or in other words the simulation will stop. Also if the robot gocs outside of the bounds of the board, then the robot will crash" as well. The robot's commands must be enqucucd and dequcucd from a Generic Qucuc of your own making. You may not usc thc built in Java Qucuc. Example Dialog: Welcome to the Robot Simulator Enter file for the Board board.txt Katar Eils for the Robot Com robot Commands.txt Bipulation begin linkB 18 in Sing- i Wien HERRIARRETER Simulation cod Quit? Et run to quit or hit ante to run anather Mimalatian X X X X Move Right Move Down Move Down Move Down Move Right Move Right Move Right Move Down Move Right Move Right Move Right Move Right Move Down Move Down Move Down Move Down Move Down Move Right

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

b. What are its goals and objectives?

Answered: 1 week ago