Show Bid Request
c++matrix
Bid Request Id: 20970
|
|
|
Posted by: |
crema (7 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Jul 7, 2002 7:57:49 PM EDT
|
Bidding Closes: |
Jul 8, 2002 8:25:22 PM EDT
|
Viewed (by coders): |
159 times
|
Deadline: |
7/11/2002
TIME EXPIRED
|
|
|
|
Description:
In this assignment you will inplement a class called "Maze". The class will contain a private matrix to represent the maze called "maze_matrix." The class "Maze" will also contain the public member functions "back_search" and "rec_search." "back_search" will search the maze using backtracking, and "rec_search" will search the maze using a recursion. Store all the code for the "Maze" class in a file called "maze.h". I will write a driver to test your class, so you MUST use the names I give you. The purpose of this program is to give you experience using backtracking and recursion.Backtracking is an organized way to make successive guesses at a solution. This strategy allows you to retrace your steps (guesses) in reverse order and try a new sequence of steps. You must implement the function "back_search" using a "STACK." The function "rec search" is a recursive function so there is no need to maintain a stack to remember a path. "back_search" and "rec_search will search a K by K matrix and find a path from a starting point to an stopping point, if one exits. To initialize the maze, use an input file called "maze_input.Your program should asked the user for the input file name. In our discussion I will use "maze_input" as the filename. Use 1 (one) to indicate the starting point, 9 the stopping point, 0 (zero) an open point in the maze, 8 a blocking point (wall). Note: Changing a 0 value indicates that the point has been traversed. Remember, when moving through the maze, you can go East, West, North, or South. You should also implement a function called "get_input" (a public member function of Maze) to read the data stored in the input file "maze_input." It should prompt the user for the input file name. This is the only place and time your program should prompt the user for anything. Your program should be able to read "maze_input" and determine the size of the matrix (YOU DO NOT ASK THE USER FOR THE SIZE). Below is a skeleton of the class "Maze" to help in the assignment description.class Maze { public: //constructors get_input( ) back_search( ) rec_search(whatever arguments you need); private: declaration for maze_matrix -- you can determine its type other private attributes you may need helper functions that get_input, back_search, and rec_search use go here.
Deliverables: Input File:
890000088
888888088
888888088
800088088
808008088
808000088
808800888
000008888
888818888
Output File:
example 1 (path exist)
The path through the maze using "back_search is as follows:
(8,4)(7,4)(7,3)(7,2)(7,1)(6,1)(5,1)(4,1)(3,1)(3,2)(3,3)
(4,3)(5,3)(5,4)(5,5)(5,6)(4,6)(3,6)(2,6)(1,6)(0,6)
(0,5)(0,4)(0,3)(0,2)(0,1)
The path through the maze using "rec_search is as follows:
(8,4)(7,4)(7,3)(7,2)(7,1)(6,1)(5,1)(4,1)(3,1)(3,2)(3,3)
(4,3)(5,3)(5,4)(5,5)(5,6)(4,6)(3,6)(2,6)(1,6)(0,6)
(0,5)(0,4)(0,3)(0,2)(0,1)
------------------------------------------------------------------------
example 2 (path doesn't exist)
There is no path through the maze starting at (7,4) and ending at (0,1) using back_search.
There is no path through the maze starting at (7,4) and ending at (0,1) using rec_search.
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Platform:
Windows XP, Visual C++
Must be 100% finished and received by buyer on:
Jul 11, 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.
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!
|
$20 (USD)
|
Jul 7, 2002 10:45:33 PM EDT
|
10
(Excellent)
|
|
|
hey there ....
I already coded exactly this project... I suppose it was for one of your collegues.
I can change it a bit to look completely different and provide it to you for 50% the amount of money he paid me.
I think this would be the fastest way you can get your project done.
regards, Victor |
|
|
|
|
|