Show Bid Request
Eight Queens
Bid Request Id: 26307
|
|
|
Posted by: |
pBp (3 ratings)
(Software buyer rating 9.66)
|
Non-action Ratio: |
Above Average - 25.00%
|
Posted: |
Sep 4, 2002 9:25:17 AM EDT
|
Bidding Closes: |
Sep 5, 2002 9:33:32 PM EDT
|
Viewed (by coders): |
255 times
|
Deadline: |
9/6/2002
TIME EXPIRED
|
|
|
|
Description:
Write a C++ program to verify possible solutions for the “Eight-Queens” puzzle. The puzzle is how to place eight queens on a standard (8 X 8) chessboard so that no queen can take another queen. In chess, the queen can take another piece that lies on the same row, column or diagonal (in any direction).
INPUT:
The input data will be in a file called solutions.dat. The file will contain one record for each potential solution. The data in each record of the file will be eight pairs of integer values. Each pair of integers will be the row and column numbers of one of the eight queens. The ordering of the pairs is irrelevant. All integers will be separated by a space.
Example file data:
8 5 7 7 7 4 6 1 5 3 3 6 1 6 1 2 5 3 3 6 2 4 4 8 1 2 6 1 8 5 7 7
(BTW, one of these examples represents a valid solution - the other is invalid)
PROCESSING: Read each potential solution record and use it to create a representation of the chessboard with the eight queens in place. Unoccupied squares will be represented by blanks and the letter Q will represent the queens.
For each potential solution determine whether it is valid or invalid.
Print out the board and a message indicating its validity.
Repeat the process for each record in the file.
When there are no more records in the input file, print out the total valid solutions, the total invalid solutions and the total number of records.
Global variables are NOT allowed (global constants are allowed).
You MUST use a two dimensional array of character as your representation of the chessboard. All traversal of paths in the array must be done using for loops
The main function of the program will NOT perform any input, output, or calculations. That pretty much leaves the declaration and initialization of objects and the calling of functions.
NOTE: Any output not clearly labeled and properly formatted will be counted as incorrect. Any source code not properly structured and documented will be counted as incorrect. OUTPUT:
The program will print out each possible solution in the form of an 8 by 8 chessboard. On the chessboard you print show empty squares as a blank and squares containing a queen as a Q. For each possible solution, you must print a message stating whether it is valid or invalid. For each invalid solution show why it is invalid by printing at least one of the vulnerable queens as an X instead of a Q.
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
It is somewhat like C, our instructor basically wants us to create an array (the chessboard), read in the input from a file, store a Q in the array for the values read in, test the validity of the Q's according to the specifications, print out the array as a chessboard and place an X over the Q if not valid, and print out total number of trials, total valid, total not valid. He wants us to have 2 global constants ROWS and COLUMNS =8 and use them in our for loops as conditions. So basically an array, for loops to store data, if statements to test, and as many functions as possible. I do need the blank spaces on the board (it needs to look like an actual chessboard). I believe that I need to print to the console. What I would normally do is go to the lab type the program on a notepad program, our system is called "exceed", got to exceed and compile it (it&'s a cc compiler) and run it and the program would process and print to the screen on exceed. (hope that helps). Please make this as simple as possible with proper documentation, no classes or structs!!
I've included the actual assignment in a zip file. Complete copyrights to all work purchased.
Platform:
Windows to print to screen
Must be 100% finished and received by buyer on:
Sep 6, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$15 (USD)
|
Sep 4, 2002 11:00:55 AM EDT
|
9.97
(Excellent)
|
|
|
Hi Brian,
I'm bidding for this for the 3rd time. I've attached the finished .exe for you to look at. You chose my bid the first time you posted this, but then decided to cancel it. Hopefully we can do business this time! Please verify my resume and ratings given by other buyers for references on my past work. I will work closely with you to ensure the final product is exactly what you need.
Dont hesitate to contact me for any questions you might have,
Sérgio Silva
|
|
Attached File
|
|
|
|
|