It’s your first day of work at Minnesota Ore Mining, Incorporated (MOM, Inc.) and you have been assigned to a project to develop a semi-automatic ore-loading vehicle. Your part of the project is to design a high level program that will test the capabilities of the vehicle by simulating its operation in a single level underground cavern. It involves evaluating the ability of the vehicle to travel through a 2x2 cavern and report on the amount of ore present in a visited chamber and whether or not to load the ore into the vehicle.
The testing of the vehicle’s operations consists of::
Reading a valid command from the keyboard
Determining if the choice of direction is allowable by comparing it to the known exit from the chamber
Displaying the chamber’s allowable exit and an appropriate error message if the choice of direction is not allowable
Asking if the ore should be loaded into the vehicle
Keeping a running total of how much ore was loaded
The valid commands include:
N, n travel north one chamber --- increment y-index
E, e travel east one chamber --- increment x-index
S, s travel south one chamber --- decrement y-index
W, w travel west one chamber --- decrement x-index
The allowable exit from each chamber is:
East from chamber (0,0) North from chamber (1,0)
West from chamber (1,1) South from chamber (0,1)
Once the vehicle has gone through an allowable exit, the chamber door behind it is closed. Hence, there is only one allowable exit from a chamber.
Use two two-dimensional arrays; one to store the initial ore weight in each chamber and the other to store the allowable exit from each chamber.
The program terminates once the vehicle is back at Chamber (0,0)
All the ore from each chamber must be loaded if the user enters “Y” or “y”. No ore gets loaded if the user enters “N” or “n”.
The final report should display how much ore was loaded into the vehicle.
Verify that the ore loaded does not exceed the amount that is in that particular chamber. Repeat an input validation message until a valid input is entered.
Verify that the ore loaded from a chamber is not a negative value. Repeat an input validation message until a valid input is entered.
I think if you attempt something, and then ask more specific questions you might get more help. Just pasting the entire assignment implies (at least to me) that you are expecting someone to do it for you. You don't even ask anything in your first post.
I could probably help. I'm studying descrete mathematics and this looks like a nice break.
This looks like a simple choose a direction and increment a variable...
N++
S++
N--
S--
// type stuff
hmm, what book are you using and what is your coding level??
int main()
{
cout << "let's start here. " << endl;
return 0;
}
//can you get this to compile??