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

  Assignment 1java tic-tac-toe game assignment 1 is

assignment 1java tic-tac-toe game assignment 1 is attachedattachment-nbsptic tac toe game.docxthis assignment consists

  Adt for a two color double stack adt consists of two stacks

design an adt for a two color double stack adt that consists of two stacks one red and one blue and has its operations color coded versions of the regular stack adt operations.

  Design and implement a set of classes and interfaces and

design and implement a set of classes and interfaces and use them to evaluate the rtas resource requirements.nbspyour

  Scanning and parsingimplement the lexical and syntactic

scanning and parsingimplement the lexical and syntactic analysis of minifun programming language. the scanner splits up

  Specify, design, and implement a class

Specify, design, and implement a class that can be used in a program that simulates a combination lock. The lock has a circular knob with the numbers 0 through 39 marked on the edge, and it has a three-number combination, which we will call x,y,z.

  This is a simulation of rolling dice actual results

this is a simulation of rolling dice. actual results approach theory only when the sample size is large. so we will

  Methods

Assignment describe the basic working of methods. How to write a method in java and how to call a method.

  Check wether two appointments overlap

in a scheduling program, we want to check wether two appointments overlap. For simplicity, appointments start at a full hour,

  Write a program to track hourly employee arrival

A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock.

  Accepts a binary number from the user

Write a Java test program that accepts a binary number from the user. You should store the binary number in a String. Your program should then use afor loop to sequence through every character in the String, counting the number of ones, zeros, and..

  Need the build function.use recursion

Implement remaining function. Everything else is provided. Use given material to receive points. Implement remaining function. Everything else is provided. Use given material to receive points. Implement remaining function. Everything else is provide..

  Complete the twins() method

Complete the twins() method, which takes an integer argument n and prints all the sets of twin primes that are less than n, one pair per line

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