Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It s your first day of work at Minnesota Ore Mining, Incorporated ( MOM , Inc. ) and you have been assigned to a project
Its 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 x 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 vehicles 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 chambers 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:
Nn travel north one chamber increment yindex
Ee travel east one chamber increment xindex
Ss travel south one chamber decrement yindex
Ww travel west one chamber decrement xindex
The allowable exit from each chamber is:
East from chamber North from chamber
West from chamber South from chamber
The amount of ore in each chamber:
Chamber tons Chamber tons
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 y 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 programs if statements should compare the users 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started