Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M91089288

Have any Question?


Related Questions in Java

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As