Hello I have a homework assignment that I need help with on how to start.
The homework assignment reads
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)
The amount of ore in each chamber:
Chamber (0,0) = 2.3 tons Chamber (1,0) = 4.8
Chamber (1,1) = 1.7 tons Chamber (0,1) = 3.4
Other conditions:
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 have no idea on how to start it, but I have attempted to start it. I'm not looking for someone to write the code for me just help on how to start it. I will post the code that I have so far & it would be great if I can get some feedback to see if I'm in the right track or not.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float o_chamber [2][2] = {2.3, 4.8, 1.7, 3.4};
cout << "The vehicle is in Chamber (0,0)." << endl;
cout << " Do ore in this Chamber is 2.3 tons" << endl;
cout << "Load the ore (y/n):" << endl;
}
|