List all of the rooms which must be traversed

Assignment Help JAVA Programming
Reference no: EM131058691

Instructions

Imagine a "dungeon game" where all the rooms are laid out in a perfect grid within a square environment. Each room has a creature posing some degree of danger ranging from 0 (harmless) to 9 (avoidance would be prudent). The object is to find a path through the dungeon from start to end which minimizes the overall amount of danger.

Each room, unless at a boundary, only has exists in the up, down, left, right directions (no diagonals). The entrance is at the upper-left (0,0) and the exit is at the lower right (n-1, n-1).

List all of the "rooms" which must be traversed, in the form of a path of room coordinates, from the start to finish.

00

70

20

50

40

10

50

10

20

10

10

20

20

10

10

10

90

50

30

50

10

10

90

10

00

Input

The input file will consist of 100 rows of 100 digits, 00-99. (Yes, 10,000 is be a lot of rooms,

Output

The program should write the output to a file (in the format illustrated above, including the "total danger" output).

Submit

• As always, your program should accept a "command line" filename, indicating the file to be read and include a proper "package structure"

• The source code for your program.

? You code should be readily compilable and runnable "as-is".

• IMPORTANT: Your program should accept an input file-name and an output file-name from the "command line".

Reference no: EM131058691

Questions Cloud

Evaluating the journalistic profile : Introduction: Does the introduction work to engage the reader through the inclusion of interesting/thought-provoking details and ideas? Does it provide critical background to establish context and scope? If there is a thesis in the introduction, ..
What is the inductance of the inductor : A series RLC circuit is operating at 3.68 kHz. At this frequency the phase angle between current and the emf source is zero .the capacitor in the circuit is 9.0 μF. A) What is the inductance of the inductor?
Write an essay that analyse client-server architectures : Write an essay of approximately 350-500 words in which you analyse client-server architectures (thin-client and fat-client) and then suggest a client-server architecture for this system that best fits customer specifications.
Prepare a recommendation to your manager : Create an appendix to your memo. Within the appendix, create an invoice similar to the one shown below using Microsoft Excel. The spreadsheet should calculate all totals for amounts, subtotal, and tax automatically.
List all of the rooms which must be traversed : List all of the "rooms" which must be traversed, in the form of a path of room coordinates, from the start to finish. The input file will consist of 100 rows of 100 digits, 00-99.
Determining the constant acceleration : A car has a constant acceleration. At 30m, its speed is 30 m/s and at 30 seconds, its speed is 40 m/s, while it is at rest at t=0 (but not x=0). What velocity does it have at 15m?
Rms power delivered to the transformer : What is the rms power delivered to the transformer? Assume an ideal transformer.
Childhood obesity treatment and prevention : childhood obesity treatment and prevention? - Do not write obesity introduction only write prevention and treatment.
Includes a demonstrated prewriting technique : For Unit 3, you will submit a project that includes a demonstrated prewriting technique, a topic sentence outline, and a draft essay that resulted from your prewriting and outline. Completing this assignment is part of a final capstone paper which..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Assignment on menu selection

Despite being a fairly old technology, menu-driven interfaces are very common in user interface design. Menu-driven interfaces consist of a series of screens which are navigated by choosing options from lists.

  Program (using java) that is suppose to find the largest

writing a program (using java) that is suppose to find the lowest integer that can be evenly divided by a range (ex. 1-25). I need help fixing/debugging it so it comes up with the proper output.

  The ai player will not be asking

The AI player will not be asking the user for any input. This means that placeShips() and fire() should not ask the user for locations. The AI player should choose locations of ships and automatically place them

  Briefly explain the code in sort inventory

Draw a UML diagram of the Shoe class using the code that has been provided - Briefly explain the code in sort Inventory. What is the inventory being sorted by? What is the sort algorithm that is being used. Explain in words how it works. Why do you..

  Create a query that lists the number of appointments

Create a query that lists the number of appointments for each doctor by day. Display the number of appointments, the doctor ID, and the appointment date. Display the output in order of doctor ID with the lowest doctor ID first.

  Explain the inventory program to include an add button

Modify the Inventory Program to include an add button, a delete button, and a modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock

  Declare a subclass of jpanel called mycolorchooser

Display the current value of each JSlider in the corresponding JTextField. When the user changes the value of the JSlider, the JTextField should be changed accordingly.

  Primary care-secondary care and tertitary care

Discuss the differences among primary care, secondary care, and tertitary care and the 6 C's of primary care

  Compute the distance between the first two points

Compute the distance between the first two points and initialize the variable that represents the second shortest distance - Display the second shortest distance and the second closest two points.

  Record managing system application

Build a student record managing system application

  What violations and crimes would you definitely file

What if you were a parole officer and had to decide whether or not to file complaints against your parolees? What violations and crimes would you definitely file complaints for and what would you most likely overlook and why?

  Develop the myclone class

You will also create another class of your choice. Your programmer-defined class should have at a minimum two instance variables and one method - You will create a Virtual World application as your final project. This Virtual World will have sever..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd