Question: CPS 2 0 0 : C + + Programming Final Computer Project It's your first day of work at Minnesota Ore Mining, Incorporated ( MOM
CPS : C Programming
Final Computer Project
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 semiautomatic oreloading 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 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 ore should be loaded into the vehicle
keeping a running total of how much ore was loaded from each chamber and how much is left in each chamber if loaded
The valid commands include:
travel north one chamber
Ee travel east one chamber
Ss travel south one chamber
travel west one chamber
The allowable exit from each chamber is:
East from chamber
West from chamber
The amount of ore in each chamber:
Chamber tons
Chamber tons
North from chamber
South from chamber
Chamber tons
Chamber tons
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 each chamber.
Variables must be used 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
The program should ask the user if ore should be loaded onto the vehicle from that chamber. If the user enters the program should inform the user how much ore is in the chamber and how much of it should be loaded onto the vehicle.
Do not accept a negative number for the ore loaded and do not accept an amount of ore that is more than what is in that chamber.
The final report should display how much total ore was loaded into the vehicle.
The program's if statements should compare the user's responses to the value stored in the arrays.
The program should display a final report of the amount of ore left in each chamber after visited.
Sample Output
The vehicle is in chamber
The ore in this chamber is tons.
Load the ore? :
The ore in this chamber is tons.
Enter the amount to load: tons.
Input one of these choices :
That is the valid exit!
You are now in chamber
The ore in this chamber is tons.
Load the ore? :
Enter the amount to load: tons.
Input one of these choices :
That is the valid exit!
You are now in chamber
The ore in this chamber is tons.
Load the ore? :
Input one of these choices NSEW:W
That is the valid exit!
You are now in chamber
The ore in this chamber is tons.
Load the ore? :
Enter the amount to load: tons.
That amount is more than the ore in this chamber!
Enter the amount to load: tons.
Input one of these choices :
Not a valid exit for chamber The valid exit is:
Input one of these choices :
That is the valid exit!
You are now in chamber
The amount of ore in the vehicle is: tons.
Chamber
Remaining Ore
table tons tons tons tons
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
