How to compile and debug your work

Assignment Help JAVA Programming
Reference no: EM13804574

Purpose: There is a famous puzzle called the 15-puzzle (feel free to look it up on the internet - eg en.wikipedia.org/wiki/15 puzzle). In this puzzle there is a frame that could hold 16 tiles in a 4x4 configuration, but the frame contains only 15 tiles where each tile is labeled with a number between 1 and 15. Since one of the locations is empty, it is possible to slide another tile (from above/below/right/left of the empty location) into this location. The goal of the puzzle is to reach the point where the numbers are organized so that they read (top to bottom, left to right) 1, 2, 3,..., 15, space. The diagram below shows a very simple example with the final solution on the right.

2448_puzzel.png

You will be writing a Java program to allow people to play the 24-puzzle (the obvious variant where the frame is 5x5) puzzle) in a text based context. My goal is that you recall how to enter programs (probably using jGrasp), how to write a small/simple program, how to compile and debug your work, and learn how to submit your work via moodle. This is meant to be a review project.

Requirements: To complete this project you will write two classes and one text file.

Create a file called Board.java which will be the "guts" of the project. This class will likely contain a field int[][] theFrame (a 5x5 integer array), a method readInitialBoard(String fileName), a method makeMove(int number), a method showBoard(), and a method isCorrect(). Each method does exactly what a reasonable person would expect. You are welcome to have other fields and methods

Create a file called Driver1.java which will interact with the user and "run" your program. There is a sample interaction below. You should have your program match the style/sytax as closely as possible. Due to class size, some of the grading of projects gets automated which means deciding to go with a di↵erent format for input or output will likely result in losing points even if you think "my way is just as good as his". Typically, this class would create an instance of Board.java, fill the board with the information from the file input.txt (a sample is below: 0 indicates the empty position). Then it would repeatedly ask the user for a command and perform that command. Legal commands would include: help, quit, and move. It ends if the user quits or the problem is solved.

Create a file called status.txt which contains your name and a short (2-10 sentence) description of the status of your program. This file should be an ascii file. Though you may create it with MS Word (or notepad/wordpad/jGrasp/etc), you should be certain that it is a text file.

Reference no: EM13804574

Questions Cloud

Write an essay about kochans various masks in confessions : Write a short essay about Kochan's various masks in confessions of a mask.
Analyze how secular and religious terrorist groups end : Analyze how secular and religious terrorist groups end. How do you explain the differences. What does this imply in terms of United States government capabilities and strategies today
Someone to knock out a consice response : You must have read the book, and preferably own the book for reference. The rest of the assinment is subjective, with these two questions being the only objective questions. Looking for someone to knock out a consice response. I put 5$ but I'd neg..
What is a status : What is a status
How to compile and debug your work : You will be writing a Java program to allow people to play the 24-puzzle (the obvious variant where the frame is 5x5) puzzle) in a text based context. My goal is that you recall how to enter programs (probably using jGrasp), how to write a small/s..
How many families can you identify in movie parenthood : How many families can you identify in the movie "Parenthood"? Describe each family. Describe the challenges of each family. How did their past environment influence their current families, either positively or negatively?
Provide explanation for your choice of business entity : Provide explanation for your choice of business entity - Description of the specific steps needed to be followed to successfully and legally start the business.
What is the social problem the researchers are investigating : What is the social problem the researchers are investigating
What methods of assessment did your organization use : Let's consider the different methods of assessment and how they are used in organizations. Think about a position recently filled in your organization. What methods of assessment did your organization use? Of those methods use, which ones were relied..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Client server chat system

Threading and GUI design using Java's network library, threading system, and swing user interlace libraries to implement a basic chat client and saver system. Thc system will allow multiple. remote users to send and receive messages across the net..

  Implements the queue interface

Element from an ArrayList is slow because of all the shifting. For this question, you should modify the poll()method so that it runs in constant time - implementations as well as correct/fast implementations. In the former case, your functions may..

  Development of a simple program involving multiple classes

Development of a Simple Program Involving Multiple Classes and development of a basic Class, development of the Country and World classes

  Outline a test plan for a substantial real-life system

Describe how you would approach the design and testing process to ensure success and quality in the result and where are the risks? How are you going to address them?

  Descriptionyou are to write a program that determines the

descriptionyou are to write a program that determines the day of the week for new years day in the year 3000. to do

  Write java program to print strings given at command line

Write a program Average.java which just prints strings that it is given at command line, one per line. If nothing is given at command line, print "No arguments".

  Product maintenance with a database

Use a class named ProductDB that's in the music.data package to add, update, and delete the products in the Product Maintenance application.

  Java enumeration lettergrade represent letter grades

Write a java enumeration LetterGrade that represents letter grades A through F, including plus and minus grades. Define a private instance variable holding a boolean value.

  If the number on two of the players'' four cards

If the number on two of the players' four cards is the same and the number on the remaining two cards is also the same yet the number on all four cards in not the same then the player gets their bet back and in addition wins 22 chips for each chip th..

  Define two different physical representations for strings

Define an ADT for character strings. Your ADT should consist of typical functions that can be performed on strings, with each function defined in terms of its input and output. Then define two different physical representations for strings.

  Problem aa savings account object holds a nonnegative

problem aa savings account object holds a nonnegative balance and provides depositk and withdrawk methods where

  Afterwards a way for the user to input

And so on and so forth then afterwards a way for the user to input that they finished a particular task on the list. After the user has input that they have finished a particular task the program should be print "Good Job!" or "Keep it up!"

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