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

Questions Cloud

Provide a rationale for your response. : Provide a rationale for your response.
Determine both the reflectance and transmittance : Light in air is incident perpendicularly on a sheet of crown glass having an index of refraction of 1.522. Determine both the reflectance and transmittance
Define a particular brand of gasoline has a density : A particular brand of gasoline has a density of 0.737 g/mL at 25 c how many grams of this gasoline would fill a 12.4 gal tank
Estimate what is the rockets thrust : A rocket, which is in deep space and initially at rest relative to an inertial reference frame, has a mass of 53.1 x 10^5 kg, of which 3.81 x 10^5 kg is fuel. What is the rocket's thrust
Latin squares - puzzle : 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.
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

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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