Latin squares - puzzle

Assignment Help JAVA Programming
Reference no: EM13552177

Latin squares is a puzzle that is played on a square grid of squares. The purpose of the puzzle is to enter a digit in each square in such a way that no row contains any duplicates and no columns contain duplicates. For example, in a 3 by 3 grid using the digits 1, 2 and 3, the following is a sample Latin square solution.

Of course, this is not the only possible solution for a 3 by 3 Latin square.

For this program, the user is presented with a GUI like the one to the right. The top row of six text fields allow the user to specify the six symbols to be used in the Latin square. The user is expected to enter six different symbols in these fields. (In the sample the p, i, g, l, e , t
characters are shown.) The 6 by 6 grid of text fields is for two purposes: (1) to allow the user to restrict the puzzle by entering characters (2) for your program to complete a solution by filling in the empty fields.

1389_Puzzle.png

A class called LatinSquareGUI is supplied to create an interact with this window. You will need to supply the buttons. The top[ two buttons are required for a 20-point program.

Clicking the Clear button causes the 6 by 6 grid to be cleared to all empty.

Clicking the Solve button causes the program to display a single solution by using only the symbols from the top row of six text fields in such a way that the non-empty grid symbols are not altered. If a solution exists, the gird must be updated to display this solution. If no solution is possible, then the grid remains unaltered.

Add the third button as shown above. In this case the Solve button does not display the solution, but rather it prints a message (to the right of the Solve button). This message indicates how many different solutions are possible for the Latin square given the constraints. Clicking the Display Solution button causes one of the solutions found by the most recent Solve click to be displayed.

Reference no: EM13552177

Previous Q& A

  Evaluate the rms voltage of the source

A source delivers an AC voltage of the form ?v = 98.0 sin (80?t), where ?v is in volts and t is in seconds, to a capacitor. The maximum current in the circuit is 0.500 A. Find the rms voltage of the source

  An organic juicing company with retail stores

An organic juicing company with retail stores and is also the manufacturer and distribution company in San Antonio, Texas.

  Calculate how much charge flows through the light bulb

A 12 V battery (which has an electric potential difference of 12 V between its terminals) is connected to a 10 W light bulb for 1 second. Calculate how much charge flows through the light bulb in the 1 second.

  Explain how many covalent bonds with other atoms

How many covalent bonds with other atoms will a sulfur atom with 6 electrons in it's outer shell most likely make, and why

  Find the maximum current in the circuit

An AC source with an output rms voltage of 34.5 V at a frequency of 60.0 Hz is connected across a 10.2-µF capacitor. Find the maximum current in the circuit

  Calculate the minimum replenishment time to build

Calculate the minimum replenishment time to build 2500 Model A fountains given the following beginning inventories.

  Is momentum conserved and is energy conserved

If two carts were hooked together at rest. Then a small explosion occurs and the carts move in opposite directions. Is momentum conserved? is Energy conserved? Explain

  Leadership and leadership development

Leadership and Leadership Development

  Explain the price per liter of the 24oz bottle

Drink cost $1.00 for 24oz or $0.76 for 0.50L. Assume 1qt=32oz. What is the price per liter of the 24oz bottle

  Determine what is the sprinters power output

a 50 kg sprinter, starting from rest, runs 50 m in 7.0 s at a constant acceleration. what is the sprinter's power output during the final 2.0 s

Reviews

Write a Review

 

Similar Q& A

  User session mgr - socket and thread programs

User Session Mgr - Socket and Thread Programs

  Question 1a give explanation why it is significant to

question 1a give explanation why it is significant to follow web engineering principles taking into account how the web

  1 gqueuea queue is an ordered collection of items in which

1 gqueuea queue is an ordered collection of items in which the removal of items is restricted to the fifo rst in rst

  Robot preparing for competition

Create an event so that the skateboard can be controlled by game player

  Write a method called printlevel

Write a method called printLevel that takes an integer n as a parameter and that prints the values at level n from left to right. The values should be printed one per line.

  Write java program to find calories-conditional operator

Write down the answer for this program? Write down Java program (use Conditional (? Operator) which suggests number of calories a person must eat each day.

  Java program to read line of text which ends with period

Write down the java program which will read the line of text which ends with the period, which serves as sentinel value. Show all the letters which occur in the text.

  In light of wrestling with ethics

In light of "Wrestling With Ethics" and other research/articles that you are able to draw upon, should profitability drive social responsibility? Be sure to support your discussion question responses with evidence from the readings and/or additional ..

  Write jvm program which accepts rpn expression

Write down the IJVM program which accepts RPN expression, with each operand and operator entered line by line. As each number (operand) is entered, push it on stack.

  Despite public and private health insurance programs

Why is it that despite public and private health insurance programs, some US citizens are without health coverage?

  Prepare executable program and a dictionary program

Prepare executable program and a dictionary Program.

  Java program which handles events from different sources

how to setup a program to respond to events from any one of these sources. How do you create the necessary listener class? How do you associate the listener object with the event source?

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